winex11: Fix outstanding memory leak (coverity)
André Hentschel
nerv at dawncrow.de
Sat Nov 10 08:56:24 CST 2012
outstanding means i claimed i already fixed it but it isn't fixed, because i missed one return.
---
dlls/winex11.drv/clipboard.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/winex11.drv/clipboard.c b/dlls/winex11.drv/clipboard.c
index e2f5b12..6e3a3cd 100644
--- a/dlls/winex11.drv/clipboard.c
+++ b/dlls/winex11.drv/clipboard.c
@@ -1328,7 +1328,11 @@ static HANDLE X11DRV_CLIPBOARD_ImportXAPIXMAP(Display *display, Window w, Atom p
/* Get the Pixmap dimensions and bit depth */
if (!XGetGeometry(gdi_display, *pPixmap, &root, &x, &y, &width, &height,
&border_width, &depth)) depth = 0;
- if (!pixmap_formats[depth]) return 0;
+ if (!pixmap_formats[depth])
+ {
+ HeapFree(GetProcessHeap(), 0, lpdata);
+ return 0;
+ }
TRACE("\tPixmap properties: width=%d, height=%d, depth=%d\n",
width, height, depth);
--
1.8.0
--
Best Regards, André Hentschel
More information about the wine-patches
mailing list