Module: wine Branch: master Commit: 0bd04d40cfcf1e2ce628285fd15d4881284f5fc9 URL: http://source.winehq.org/git/wine.git/?a=commit;h=0bd04d40cfcf1e2ce628285fd1...
Author: Marcus Meissner marcus@jet.franken.de Date: Sun Jun 9 20:47:00 2013 +0200
oleaut32: Avoid memory leaking junk (Coverity).
---
dlls/oleaut32/typelib.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index c2c3a63..024df0d 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -9771,6 +9771,7 @@ static HRESULT WINAPI ICreateTypeLib2_fnSaveAllChanges(ICreateTypeLib2 *iface) FILE_ATTRIBUTE_NORMAL, 0); if (outfile == INVALID_HANDLE_VALUE){ WMSFT_free_file(&file); + heap_free(junk); return TYPE_E_IOERROR; }
@@ -9778,10 +9779,12 @@ static HRESULT WINAPI ICreateTypeLib2_fnSaveAllChanges(ICreateTypeLib2 *iface) if (!br) { WMSFT_free_file(&file); CloseHandle(outfile); + heap_free(junk); return TYPE_E_IOERROR; }
br = WriteFile(outfile, junk, junk_size, &written, NULL); + heap_free(junk); if (!br) { WMSFT_free_file(&file); CloseHandle(outfile);