mirror of
https://github.com/holub/mame
synced 2025-05-09 15:51:48 +03:00
vconv: fixed potential memory leaks (nw)
This commit is contained in:
parent
c7922d275f
commit
e85c30afa2
@ -205,6 +205,7 @@ static DWORD get_exe_version(const char *executable)
|
||||
// retrieve the version info
|
||||
if (!GetFileVersionInfo(path, 0, version_info_size, version_info))
|
||||
{
|
||||
GlobalFree(version_info);
|
||||
fprintf(stderr, "GetFileVersionInfo() failed\n");
|
||||
exit(-100);
|
||||
}
|
||||
@ -212,6 +213,7 @@ static DWORD get_exe_version(const char *executable)
|
||||
// extract the VS_FIXEDFILEINFO from the version info
|
||||
if (!VerQueryValue(version_info, sub_block, &sub_buffer, &sub_buffer_size))
|
||||
{
|
||||
GlobalFree(version_info);
|
||||
fprintf(stderr, "VerQueryValue() failed\n");
|
||||
exit(-100);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user