mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-04 04:44:16 +01:00
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 <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
1a9ece0438
commit
9cef8c882e
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user