From 9cef8c882e435df924741da38a8e96d9db114972 Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Mon, 16 Jun 2014 20:15:22 +0200 Subject: [PATCH] util: fix image leak in wmsebg's parseTexture (Coverity #50166) As pointed by Coverity, in some case of texture with image that needs to be scaled the temporary scaled image would be leaked if and error occured during its conversion. Signed-off-by: Christophe CURIS --- util/wmsetbg.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/util/wmsetbg.c b/util/wmsetbg.c index b363c201..80a845e2 100644 --- a/util/wmsetbg.c +++ b/util/wmsetbg.c @@ -230,6 +230,8 @@ applyImage(RContext * rc, BackgroundTexture * texture, RImage * image, char type if (!RConvertImage(rc, image, &pixmap)) { wwarning("could not convert texture:%s", RMessageForError(RErrorCode)); + if (fimage) + RReleaseImage(image); return; }