mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-26 00:12:31 +01:00
Fixed memory leak due to non-freed temporary PropList
When menus are read in the PropList format, they are loaded into a temporary PropList object, which is parsed into the internal menu structure, and the PropList object is no more used. There were two cases where this temp object was not freed.
This commit is contained in:
committed by
Carlos R. Mafra
parent
0004d38ef8
commit
ea19294b70
@@ -574,6 +574,9 @@ static WMenu *constructPLMenu(WScreen *screen, char *path)
|
||||
return NULL;
|
||||
|
||||
menu = configureMenu(screen, pl, False);
|
||||
|
||||
WMReleasePropList(pl);
|
||||
|
||||
if (!menu)
|
||||
return NULL;
|
||||
|
||||
@@ -1075,6 +1078,9 @@ static WMenu *readPLMenuPipe(WScreen * scr, char **file_name)
|
||||
return NULL;
|
||||
|
||||
menu = configureMenu(scr, plist, False);
|
||||
|
||||
WMReleasePropList(plist);
|
||||
|
||||
if (!menu)
|
||||
return NULL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user