Fixed potential resource leak of library handle (found by Coverity, CID 989315)

This commit is contained in:
Joachim Bauch
2013-03-05 00:30:25 +01:00
parent 8a7f64ea3a
commit 0f6bdc7c16
+2
View File
@@ -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;
}
}