1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-22 22:28:02 +01:00

WMaker: fix memory leak in screen initialisation (Coverity #50134)

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.curis@free.fr>
This commit is contained in:
Christophe CURIS
2014-05-20 21:46:39 +02:00
committed by Carlos R. Mafra
parent 9940073530
commit fab73f47c7

View File

@@ -593,6 +593,12 @@ WScreen *wScreenInit(int screen_number)
if (!scr->wmscreen) { if (!scr->wmscreen) {
wfatal(_("could not initialize WINGs widget set")); 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; return NULL;
} }