diff options
| author | Dana Jansens <danakj@orodu.net> | 2008-02-27 22:19:59 -0500 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2008-02-27 22:19:59 -0500 |
| commit | 1018b836c4d7e94efa8f74b4a34e1a93b9b51a20 (patch) | |
| tree | e1a9a841abb48d5844b975932e306b70c7bcfaa4 /openbox/actions/execute.c | |
| parent | 92f23264c78f759052fd6d1376961382c55699e4 (diff) | |
clean up the execute action code, and free the prompt option string
Diffstat (limited to 'openbox/actions/execute.c')
| -rw-r--r-- | openbox/actions/execute.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/openbox/actions/execute.c b/openbox/actions/execute.c index 4197109f..eb1b461d 100644 --- a/openbox/actions/execute.c +++ b/openbox/actions/execute.c @@ -79,6 +79,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); } } @@ -97,20 +98,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 */ |
