Stupid me, those free() are absurdly wrong, there are no leaks there.
Attached patch fixes the header leaks.
On Thu, Aug 13, 2009 at 4:02 PM, Andre Dieb <andre.mart...@ee.ufcg.edu.br>wrote:
> Hello,
>
> As you guys noticed, the code was forcing headers = NULL without destroying
> it (maybe some precaution for preventing mixed headers on successive send()
> calls).
>
> As send() cleans headers on the beginning and destroy() frees the list, we
> may not set it to NULL. If the user finishes using and destroy()'s it, the
> list will get freed. On the other possible case, if the user do successive
> calls to send(), the list will always be cleaned for the next.
>
> Another leak we had was that curl_slist_append() copies the string,
> according to their doc (and valgrind). I also fixed those copy leaks.
>
>
> On Thu, Aug 13, 2009 at 12:31 PM, Gustavo Sverzut Barbieri
> <barbi...@profusion.mobi> wrote:
>
>> André, did you investigated this any further? I guess cedric is
>> correct and we'd need to check for headers.
>>
>> On Wed, Aug 12, 2009 at 6:48 AM, Cedric BAIL<cedric.b...@free.fr> wrote:
>> > On Mon, Aug 10, 2009 at 11:19 PM, Andre
>> > Dieb<andre.mart...@ee.ufcg.edu.br> wrote:
>> >> This new version of the patch also enables ecore_con_url to make custom
>> HTTP
>> >> requests (such as HEAD, SUBSCRIBE, UNSUBSCRIBE and other obscure
>> stuff).
>> >
>> > Ok, it's in svn.
>> >
>> > I have just a question regarding the possible leak of the headers
>> > structure as you force it to NULL without destroying it. Did you test
>> > your program with valgrind ?
>> >
>> > --
>> > Cedric BAIL
>> >
>> >
>> ------------------------------------------------------------------------------
>> > Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>> 30-Day
>> > trial. Simplify your report design, integration and deployment - and
>> focus on
>> > what you do best, core application coding. Discover what's new with
>> > Crystal Reports now. http://p.sf.net/sfu/bobj-july
>> > _______________________________________________
>> > enlightenment-devel mailing list
>> > enlightenment-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>> >
>>
>>
>>
>> --
>> Gustavo Sverzut Barbieri
>> http://profusion.mobi embedded systems
>> --------------------------------------
>> MSN: barbi...@gmail.com
>> Skype: gsbarbieri
>> Mobile: +55 (19) 9225-2202
>>
>
>
>
> --
> André Dieb Martins
>
> Embedded Systems and Pervasive Computing Lab (Embedded)
> Electrical Engineering Department (DEE)
> Center of Electrical Engineering and Informatics (CEEI)
> Federal University of Campina Grande (UFCG)
>
> Blog: http://genuinepulse.blogspot.com/
>
--
André Dieb Martins
Embedded Systems and Pervasive Computing Lab (Embedded)
Electrical Engineering Department (DEE)
Center of Electrical Engineering and Informatics (CEEI)
Federal University of Campina Grande (UFCG)
Blog: http://genuinepulse.blogspot.com/
Index: src/lib/ecore_con/ecore_con_url.c
===================================================================
--- src/lib/ecore_con/ecore_con_url.c (revision 41746)
+++ src/lib/ecore_con/ecore_con_url.c (working copy)
@@ -571,9 +571,6 @@
url_con->received = 0;
- /* FIXME: Check if curl will leak memory or correctly destroy the headers */
- url_con->headers = NULL;
-
return _ecore_con_url_perform(url_con);
#else
return 0;
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel