[Ocfs2-tools-devel] [PATCH] fsck.ocfs2: fix a minor memleak

Coly Li coly.li at suse.de
Fri Nov 6 00:56:54 PST 2009



On 2009年11月06日 09:50, Sunil Mushran Wrote:
> Tristan wrote:
>>
>> I guess memory should not be placed there, it should be following
>> instead:
>>
>> else {
>>
>>         ret = OCFS2_ET_INTERNAL_FAILURE;
>>         goto out;
>>
>> }
>>
>> out:
>> if (dp)
>> free(dp);
>> ...
>>   
> 
> I would imagine you mean....
> 
> out:
> if (ret && dp)
>  free(dp);

The above is a 3 lines patch, that's why I sent out an 1 line patch :-)


-- 
Coly Li
SuSE Labs



More information about the Ocfs2-tools-devel mailing list