[Ocfs2-tools-devel] [PATCH] fsck.ocfs2: fix a minor memleak
Sunil Mushran
sunil.mushran at oracle.com
Fri Nov 6 14:51:51 PST 2009
Coly Li wrote:
> 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 :-)
>
But it is more consistent with our coding style.
More information about the Ocfs2-tools-devel
mailing list