>From de867e6227864f3b37fedf3597b7cc121cb1a42c Mon Sep 17 00:00:00 2001
From: Tobias Stoeckmann <[email protected]>
Date: Thu, 3 May 2012 17:54:13 +0200
Subject: [PATCH] Avoid memory leak on error path in constructMenu.
---
src/rootmenu.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/rootmenu.c b/src/rootmenu.c
index c168279..f9b51ab 100644
--- a/src/rootmenu.c
+++ b/src/rootmenu.c
@@ -588,6 +588,8 @@ static void constructMenu(WMenu * menu, WMenuEntry * entry)
separateCommand((char *)entry->clientdata, &path, &cmd);
if (path == NULL || *path == NULL || **path == 0) {
wwarning(_("invalid OPEN_MENU specification: %s"), (char
*)entry->clientdata);
+ if (cmd)
+ wfree(cmd);
return;
}
--
1.7.6
--
To unsubscribe, send mail to [email protected].