Commit d6eb5eb7 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

hhctrl.ocx: Fix a memory leak on an error path (Smatch).

parent a9f3bd06
......@@ -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) ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment