winex11: Avoid memory leaks (coverity).

This commit is contained in:
André Hentschel 2012-11-03 17:25:45 +01:00 committed by Alexandre Julliard
parent 22c254c3ec
commit 574cf27f2a

View File

@ -1370,6 +1370,8 @@ static HANDLE X11DRV_CLIPBOARD_ImportXAPIXMAP(Display *display, Window w, Atom p
}
if (bits.free) bits.free( &bits );
}
HeapFree(GetProcessHeap(), 0, lpdata);
}
return hClipData;
@ -1489,7 +1491,10 @@ static HANDLE X11DRV_CLIPBOARD_ImportClipboardData(Display *display, Window w, A
/* Turn on the DDESHARE flag to enable shared 32 bit memory */
hClipData = GlobalAlloc(GMEM_MOVEABLE | GMEM_DDESHARE, cbytes);
if (hClipData == 0)
{
HeapFree(GetProcessHeap(), 0, lpdata);
return NULL;
}
if ((lpClipData = GlobalLock(hClipData)))
{