[Ocfs2-tools-devel] [PATCH] fsck.ocfs2: fix a minor memleak
    Tristan 
    tristan.ye at oracle.com
       
    Thu Nov  5 17:56:43 PST 2009
    
    
  
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);
why need to '&&' with ret? shouldn't dp be released regardless of 
whatever the ret was?
    
    
More information about the Ocfs2-tools-devel
mailing list