mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-23 06:38:05 +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:
committed by
Carlos R. Mafra
parent
9940073530
commit
fab73f47c7
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user