remove unneeded strdup
authorDana Jansens <danakj@orodu.net>
Tue, 9 Mar 2010 15:51:02 +0000 (10:51 -0500)
committerDana Jansens <danakj@orodu.net>
Tue, 9 Mar 2010 15:51:02 +0000 (10:51 -0500)
src/archive.c

index b3404d7..1264627 100644 (file)
@@ -164,15 +164,12 @@ static gboolean change_dir(const gchar *dir)
 
 static gchar* install_theme_to(const gchar *file, const gchar *to)
 {
-    gchar *glob;
     gchar **argv;
     gchar *errtxt = NULL, *outtxt = NULL;
     gint exitcode;
     GError *e = NULL;
     gchar *name = NULL;
 
-    glob = g_strdup_printf("*/openbox-3/", name);
-
     argv = g_new(gchar*, 11);
     argv[0] = g_strdup("tar");
     argv[1] = g_strdup("-x");
@@ -183,7 +180,7 @@ static gchar* install_theme_to(const gchar *file, const gchar *to)
     argv[6] = g_strdup(file);
     argv[7] = g_strdup("-C");
     argv[8] = g_strdup(to);
-    argv[9] = g_strdup(glob);
+    argv[9] = g_strdup("*/openbox-3/");
     argv[10] = NULL;
     if (!g_spawn_sync(NULL, argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL,
                       &outtxt, &errtxt, &exitcode, &e))
@@ -222,6 +219,5 @@ static gchar* install_theme_to(const gchar *file, const gchar *to)
 
     g_free(outtxt);
     g_free(errtxt);
-    g_free(glob);
     return name;
 }