clean up the execute action code, and free the prompt option string
Dana Jansens danakj@orodu.net
1 files changed,
3 insertions(+),
9 deletions(-)
jump to
M
openbox/actions/execute.c
→
openbox/actions/execute.c
@@ -79,6 +79,7 @@ g_free(o->cmd);
g_free(o->sn_name); g_free(o->sn_icon); g_free(o->sn_wmclass); + g_free(o->prompt); g_free(o); } }@@ -97,20 +98,13 @@ }
static gboolean run_func(ObActionsData *data, gpointer options); -static void prompt_cb(ObPrompt *p, gint result, gpointer data) +static void prompt_cb(ObPrompt *p, gint result, gpointer options) { - Options *options = data; - if (result) run_func(NULL, options); prompt_unref(p); - - g_free(options->cmd); - g_free(options->sn_name); - g_free(options->sn_icon); - g_free(options->sn_wmclass); - g_free(options); + free_func(options); } /* Always return FALSE because its not interactive */