Author: pschweitzer
Date: Sun Apr 6 12:59:01 2014
New Revision: 62649
URL:
http://svn.reactos.org/svn/reactos?rev=62649&view=rev
Log:
[FORMAT]
- Check LoadLibrary() return
- In case it doesn't match, free library
CID #716330
Modified:
trunk/reactos/base/system/format/format.c
Modified: trunk/reactos/base/system/format/format.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/format/format.…
==============================================================================
--- trunk/reactos/base/system/format/format.c [iso-8859-1] (original)
+++ trunk/reactos/base/system/format/format.c [iso-8859-1] Sun Apr 6 12:59:01 2014
@@ -238,20 +238,24 @@
BOOLEAN LoadFMIFSEntryPoints()
{
HMODULE hFmifs = LoadLibrary( _T("fmifs.dll") );
+ if (hFmifs == NULL) {
+ return FALSE;
+ }
+
if( !(void*) GetProcAddress( hFmifs, "FormatEx" ) ) {
-
+ FreeLibrary(hFmifs);
return FALSE;
}
if( !((void *) GetProcAddress( hFmifs,
"EnableVolumeCompression" )) ) {
-
+ FreeLibrary(hFmifs);
return FALSE;
}
if( !((void *) GetProcAddress( hFmifs,
"QueryAvailableFileSystemFormat" )) ) {
-
+ FreeLibrary(hFmifs);
return FALSE;
}