X-Git-Url: http://git.openbox.org/?p=mikachu%2Fopenbox.git;a=blobdiff_plain;f=openbox%2Factions%2Fexecute.c;h=fd9625c5486081d4cc7ea508952f4feff6dd33ea;hp=fa66a484a8b4828f0ab5ead4487f827163046c1a;hb=163950b23bf796a39870044417ca54d667b6b470;hpb=f857b0eb99471c9123d6e641afafeab5f47700e2 diff --git a/openbox/actions/execute.c b/openbox/actions/execute.c index fa66a48..fd9625c 100644 --- a/openbox/actions/execute.c +++ b/openbox/actions/execute.c @@ -76,6 +76,7 @@ static void free_func(gpointer options) g_free(o->sn_name); g_free(o->sn_icon); g_free(o->sn_wmclass); + g_free(o->prompt); g_free(o); } } @@ -94,20 +95,13 @@ static Options* dup_options(Options *in) 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 */