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

As pointed by Coverity, if the function wScreenInit fails to properly
attach to the screen then the storage structure and content were not
released before returning.

Signed-off-by: Christophe CURIS <christophe.cu...@free.fr>
---
 src/screen.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/screen.c b/src/screen.c
index afc9d17..bb9d9b3 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -593,6 +593,12 @@ WScreen *wScreenInit(int screen_number)
 
        if (!scr->wmscreen) {
                wfatal(_("could not initialize WINGs widget set"));
+               RDestroyContext(scr->rcontext);
+               WMFreeArray(scr->fakeGroupLeaders);
+               wfree(scr->totalUsableArea);
+               wfree(scr->usableArea);
+               WMFreeBag(scr->stacking_list);
+               wfree(scr);
                return NULL;
        }
 
-- 
1.9.2


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

Reply via email to