hhctrl.ocx: Fix a memory leak on an error path (Smatch).
This commit is contained in:
parent
a9f3bd06fd
commit
d6eb5eb7c6
|
@ -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) ;
|
||||
|
|
Loading…
Reference in New Issue