[rrd-developers] [PATCH] rrdcached FETCH command leaks like a sieve
Thorsten von Eicken
tve at voneicken.com
Wed May 12 16:26:51 CEST 2010
Tobi, thanks for checking. Overall I prefer to have a really cool new
feature I can patch up over not having the feature to start with!
Cheers & Thanks for RRDtool,
TvE
On 5/12/2010 1:44 AM, Tobias Oetiker wrote:
> Hi Thorsten,
>
> you are absolutely right .. and your patch looks fine too ... I
> guess I should vet the contributions better ...
>
> thanks
> tobi
>
> Today Thorsten von Eicken wrote:
>
>
>> The following patch seems to fix it, I'd appreciate a second eye on
>> this. Basically the data returned by rrd_fetch_r wasn't freed...
>>
>> --- src/rrd_daemon.c.orig 2010-04-30 16:13:40.000000000 +0000
>> +++ src/rrd_daemon.c 2010-05-12 06:53:18.000000000 +0000
>> @@ -1628,7 +1634,9 @@
>> if (i> 0)
>> SSTRCAT (linebuf, " ", linebuf_fill);
>> SSTRCAT (linebuf, ds_namv[i], linebuf_fill);
>> + rrd_freemem(ds_namv[i]);
>> }
>> + rrd_freemem(ds_namv);
>> add_response_info (sock, "DSName: %s\n", linebuf);
>> }
>>
>> @@ -1654,6 +1662,7 @@
>>
>> add_response_info (sock, "%10lu:%s\n", (unsigned long) t, linebuf);
>> } /* for (t) */
>> + rrd_freemem(data);
>>
>> return (send_response (sock, RESP_OK, "Success\n"));
>> #undef SSTRCAT
>>
>>
>> Cheers,
>> Thorsten
>>
>> _______________________________________________
>> rrd-developers mailing list
>> rrd-developers at lists.oetiker.ch
>> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-developers
>>
>>
>>
>
More information about the rrd-developers
mailing list