From: Mikael Magnusson Date: Fri, 19 Feb 2010 22:24:52 +0000 (+0100) Subject: Exit action failed to free options struct X-Git-Tag: release-3.4.11.1~7 X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=8208e67d8920076cc0eae3d4098fe1c3979c13ae;p=dana%2Fopenbox.git Exit action failed to free options struct --- diff --git a/openbox/actions/exit.c b/openbox/actions/exit.c index 567926e1..f447830c 100644 --- a/openbox/actions/exit.c +++ b/openbox/actions/exit.c @@ -10,11 +10,12 @@ typedef struct { static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node); static gboolean run_func(ObActionsData *data, gpointer options); +static void free_func(gpointer options); void action_exit_startup(void) { - actions_register("Exit", setup_func, NULL, run_func, NULL, NULL); - actions_register("SessionLogout", setup_func, NULL, run_func, NULL, NULL); + actions_register("Exit", setup_func, free_func, run_func, NULL, NULL); + actions_register("SessionLogout", setup_func, free_func, run_func, NULL, NULL); } static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node) @@ -31,6 +32,12 @@ static gpointer setup_func(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node) return o; } +static void free_func(gpointer options) +{ + if (options) + g_free(options); +} + static void do_exit(void) { if (session_connected())