- CmpOpenHiveFiles: If "Extension" is false then we won't have allocated any buffer, so there will never be a buffer to free

- Fix for Coverity Error CID: 29

svn path=/trunk/; revision=36518
This commit is contained in:
Stefan Ginsberg 2008-09-25 18:49:27 +00:00
parent ac376c0adb
commit b1a8e2b3fd

View file

@ -464,8 +464,7 @@ CmpOpenHiveFiles(IN PCUNICODE_STRING BaseName,
/* Check if we don't need to create a log file */
if (!Extension)
{
/* We're done, close handles and free buffers */
if (NameBuffer) ExFreePool(NameBuffer);
/* We're done, close handles */
ObDereferenceObject(Event);
ZwClose(EventHandle);
return STATUS_SUCCESS;