On Mon, Oct 29, 2012 at 10:37 AM, Nikolay Sivov <bungleh...@gmail.com> wrote:
> On 10/29/2012 11:33, Frédéric Delanoy wrote:
>>
>> FreeLibrary(temp) can be called twice on error.
>>
>> CID 714004
>> ---
>
>>     error:
>>       FreeLibrary(lib);
>> -    FreeLibrary(temp);
>> +    if (temp != NULL) FreeLibrary(temp);
>>       SetLastError(TRUST_E_SUBJECT_FORM_UNKNOWN);
>>       return FALSE;
>>   }
>
> This is useless, FreeLibrary() checks for NULL.

Right, although it uses "SetLastError( ERROR_INVALID_HANDLE)" when it
encounters NULLs
But the return value of FreeLibrary isn't checked, so it probably
doesn't matter much.

Frédéric


Reply via email to