win32: lib: remove unused variable, fix error message may be not printed

This commit is contained in:
Alibek Omarov 2019-06-30 17:26:57 +03:00 committed by GitHub
parent f2d588574c
commit a8f7b4fc5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -953,7 +953,6 @@ table_error:
qboolean COM_CheckLibraryDirectDependency( const char *name, const char *depname, qboolean directpath )
{
MEMORYMODULE *result = NULL;
PIMAGE_DOS_HEADER dos_header;
PIMAGE_NT_HEADERS old_header;
PIMAGE_DATA_DIRECTORY directory;
@ -972,7 +971,7 @@ qboolean COM_CheckLibraryDirectDependency( const char *name, const char *depname
if( !data )
{
Q_snprintf( errorstring, sizeof( errorstring ), "couldn't load %s", name );
return false;
goto libraryerror;
}
dos_header = ( PIMAGE_DOS_HEADER )data;
@ -1013,7 +1012,7 @@ qboolean COM_CheckLibraryDirectDependency( const char *name, const char *depname
libraryerror:
Con_Printf( errorstring );
Mem_Free( data ); // release memory
if( data ) Mem_Free( data ); // release memory
return false;
}