From 232aa89efd13d21b2e5dca69e0aea70a03d09544 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Mon, 17 Nov 2014 00:22:33 +0100 Subject: [PATCH] Fixed memory leak. --- server/shadow/X11/x11_shadow.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/shadow/X11/x11_shadow.c b/server/shadow/X11/x11_shadow.c index 3f1a964..d1a8591 100644 --- a/server/shadow/X11/x11_shadow.c +++ b/server/shadow/X11/x11_shadow.c @@ -386,7 +386,10 @@ int x11_shadow_pointer_alpha_update(x11ShadowSubsystem* subsystem) msg->pixels = (BYTE*) malloc(msg->scanline * msg->height); if (!msg->pixels) + { + free (msg); return -1; + } CopyMemory(msg->pixels, subsystem->cursorPixels, msg->scanline * msg->height); msg->premultiplied = TRUE; -- 2.7.4