Commit 8ddb00b2 authored by Frédéric Delanoy's avatar Frédéric Delanoy Committed by Alexandre Julliard

ole32: Fix some leaks (coverity).

parent 02da0411
......@@ -973,10 +973,17 @@ FileMonikerImpl_CommonPrefixWith(IMoniker* iface,IMoniker* pmkOther,IMoniker** p
return nb1;
nb2=FileMonikerImpl_DecomposePath(pathOther,&stringTable2);
if (FAILED(nb2))
{
free_stringtable(stringTable1);
return nb2;
}
if (nb1==0 || nb2==0)
{
free_stringtable(stringTable1);
free_stringtable(stringTable2);
return MK_E_NOPREFIX;
}
commonPath=HeapAlloc(GetProcessHeap(),0,sizeof(WCHAR)*(min(lstrlenW(pathThis),lstrlenW(pathOther))+1));
if (!commonPath)
......@@ -1136,10 +1143,15 @@ FileMonikerImpl_RelativePathTo(IMoniker* iface,IMoniker* pmOther, IMoniker** ppm
return res;
len1=FileMonikerImpl_DecomposePath(str1,&tabStr1);
if (FAILED(len1))
return E_OUTOFMEMORY;
len2=FileMonikerImpl_DecomposePath(str2,&tabStr2);
if (FAILED(len1) || FAILED(len2))
return E_OUTOFMEMORY;
if (FAILED(len2))
{
free_stringtable(tabStr1);
return E_OUTOFMEMORY;
}
/* count the number of similar items from the begin of the two paths */
for(sameIdx=0; ( (tabStr1[sameIdx]!=NULL) &&
......
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