Re: [PATCH hail] lib/hstor.c: avoid an unconditional leak in append_qparam

Jeff Garzik <[email protected]> Mon, 27 Sep 2010 20:23:55 -0400
Newsgroups org.kernel.vger.hail-devel
Message-ID <[email protected]>
On 09/27/2010 12:29 PM, Pete Zaitcev wrote:
> On Mon, 27 Sep 2010 10:53:06 +0200
> Jim Meyering<[email protected]>  wrote:
>
>> -	stmp = huri_field_escape(strdup(val), QUERY_ESCAPE_MASK);
>> +	v = strdup(val);
>> +	stmp = huri_field_escape(v, QUERY_ESCAPE_MASK);
>>   	str = g_string_append(str, stmp);
>>   	free(stmp);
>> +	free(v);
>
> I think you may be fooled by the ridiculous calling convention

Doh, my memory and I were fooled, too.