mirror of
https://github.com/vxcontrol/MemoryModule.git
synced 2026-07-21 06:05:55 -04:00
Fixed potential resource leak of library handle (found by Coverity, CID 989315)
This commit is contained in:
@@ -257,6 +257,7 @@ BuildImportTable(PMEMORYMODULE module)
|
||||
|
||||
module->modules = (HMODULE *)realloc(module->modules, (module->numModules+1)*(sizeof(HMODULE)));
|
||||
if (module->modules == NULL) {
|
||||
FreeLibrary(handle);
|
||||
result = 0;
|
||||
break;
|
||||
}
|
||||
@@ -284,6 +285,7 @@ BuildImportTable(PMEMORYMODULE module)
|
||||
}
|
||||
|
||||
if (!result) {
|
||||
FreeLibrary(handle);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user