]> Dogcows Code - chaz/openbox/commitdiff
clean up the execute action code, and free the prompt option string
authorDana Jansens <danakj@orodu.net>
Thu, 28 Feb 2008 03:19:59 +0000 (22:19 -0500)
committerDana Jansens <danakj@orodu.net>
Thu, 28 Feb 2008 03:19:59 +0000 (22:19 -0500)
openbox/actions/execute.c

index 4197109fba0ec0bc2c6bc948f280583926fe3364..eb1b461d7142ac5952c1f05e85f0e200786497a4 100644 (file)
@@ -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 */
This page took 0.023917 seconds and 4 git commands to generate.