From: Christophe CURIS <christophe.cu...@free.fr>

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 <christophe.cu...@free.fr>
---
 util/wmsetbg.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/util/wmsetbg.c b/util/wmsetbg.c
index b363c20..80a845e 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;
                        }
 
-- 
1.9.2


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to