Skip to content

Commit

Permalink
Merge pull request #2 from fiendish/patch-1
Browse files Browse the repository at this point in the history
Fix malloc without free
  • Loading branch information
moteus authored Aug 2, 2022
2 parents 7d05d69 + 074b6c7 commit 29f0fc2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/library/tCOMUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,7 @@ ITypeLib* tCOMUtil::LoadTypeLibFromCLSID(CLSID clsid,
if(pcClsid)
free(pcClsid);

free(bLibID);
return NULL;
}

Expand Down Expand Up @@ -489,8 +490,11 @@ ITypeLib* tCOMUtil::LoadTypeLibFromCLSID(CLSID clsid,
&version_major,
&version_minor);

if(!result)
if(!result) {
free(bLibID);
free(wcTypelib);
return NULL;
}
}

free(bLibID);
Expand Down

0 comments on commit 29f0fc2

Please sign in to comment.