From ea19294b70b15175b5e426767db13e9bba0f5bea Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Wed, 8 May 2013 15:44:09 +0200 Subject: [PATCH] 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. --- src/rootmenu.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/rootmenu.c b/src/rootmenu.c index db812120..28bed809 100644 --- a/src/rootmenu.c +++ b/src/rootmenu.c @@ -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; -- 2.11.4.GIT