Module: wine Branch: master Commit: d6eb5eb7c6f828474da2436023f422725016b119 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d6eb5eb7c6f828474da2436023...
Author: Michael Stefaniuc mstefani@redhat.de Date: Thu Jul 2 00:32:31 2009 +0200
hhctrl.ocx: Fix a memory leak on an error path (Smatch).
---
dlls/hhctrl.ocx/chm.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/dlls/hhctrl.ocx/chm.c b/dlls/hhctrl.ocx/chm.c index c3a7499..b7df8e7 100644 --- a/dlls/hhctrl.ocx/chm.c +++ b/dlls/hhctrl.ocx/chm.c @@ -370,8 +370,10 @@ CHMInfo *OpenCHM(LPCWSTR szFile) if (!(ret = heap_alloc_zero(sizeof(CHMInfo)))) return NULL;
- if (!(ret->szFile = strdupW(szFile))) + if (!(ret->szFile = strdupW(szFile))) { + heap_free(ret); return NULL; + }
hres = CoCreateInstance(&CLSID_ITStorage, NULL, CLSCTX_INPROC_SERVER, &IID_IITStorage, (void **) &ret->pITStorage) ;