----- Amadeusz Sławiński <am...@asmblr.net> a écrit : > two similar ones, if we return then free allocated memory > > Signed-off-by: Amadeusz Sławiński <am...@asmblr.net> > --- > wmlib/menu.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/wmlib/menu.c b/wmlib/menu.c > index 0378427..9a08ba5 100644 > --- a/wmlib/menu.c > +++ b/wmlib/menu.c > @@ -84,6 +84,7 @@ WMMenuAddItem(WMMenu * menu, char *text, WMMenuAction > action, > entry->entryline = malloc(strlen(text) + 100); > if (!entry->entryline) { > free(menu); > + free(entry);
Hello, A little comment here, looking at the code it looks like the free(menu) is wrong, and is the result of a 'typo' where the original expected behaviour was only the free(entry) you're adding. I'm gonna propose a patch that removes the free(menu). > [...] -- To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.