Hi, this frees allocated memory in case of an error.
Signed-off-by: Christoph Fritz <[email protected]> --- ChangeLog | 4 ++++ fvwm/windowlist.c | 1 + 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog index 15b140b..f93b375 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-03-30 Christoph Fritz <[email protected]> + * fvwm/windowlist.c (CMD_WindowList): + Free allocated memory in case of error. + 2010-02-28 Thomas Adam <[email protected]> * fvwm/move_resize.c (__resize_step): Don't explicitly send MotionNotify event during Resize (GeometryWindow) diff --git a/fvwm/windowlist.c b/fvwm/windowlist.c index 23bc889..8034563 100644 --- a/fvwm/windowlist.c +++ b/fvwm/windowlist.c @@ -604,6 +604,7 @@ void CMD_WindowList(F_CMD_ARGS) iconifiedList = malloc(numWindows*sizeof(t)); if (iconifiedList == NULL) { + free(windowList); return; } } -- 1.5.6.5
Subject: [PATCH] CMD_WindowList: Free allocated memory in case of error Signed-off-by: Christoph Fritz <[email protected]> --- ChangeLog | 4 ++++ fvwm/windowlist.c | 1 + 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog index 15b140b..f93b375 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-03-30 Christoph Fritz <[email protected]> + * fvwm/windowlist.c (CMD_WindowList): + Free allocated memory in case of error. + 2010-02-28 Thomas Adam <[email protected]> * fvwm/move_resize.c (__resize_step): Don't explicitly send MotionNotify event during Resize (GeometryWindow) diff --git a/fvwm/windowlist.c b/fvwm/windowlist.c index 23bc889..8034563 100644 --- a/fvwm/windowlist.c +++ b/fvwm/windowlist.c @@ -604,6 +604,7 @@ void CMD_WindowList(F_CMD_ARGS) iconifiedList = malloc(numWindows*sizeof(t)); if (iconifiedList == NULL) { + free(windowList); return; } } -- 1.5.6.5
