[gnome-initial-setup] copy-worker: Don't bother with memory management
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup] copy-worker: Don't bother with memory management
- Date: Thu, 8 Nov 2012 21:51:06 +0000 (UTC)
commit eb5ddb585970318dc9fab3decbc2ea23e0d1bc57
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Nov 8 16:35:28 2012 -0500
copy-worker: Don't bother with memory management
This is a quick process that's going to exit soon, and the kernel
will clean up our memory mess for us.
.../gnome-initial-setup-copy-worker.c | 20 ++++----------------
1 files changed, 4 insertions(+), 16 deletions(-)
---
diff --git a/gnome-initial-setup/gnome-initial-setup-copy-worker.c b/gnome-initial-setup/gnome-initial-setup-copy-worker.c
index 0def968..9c03991 100644
--- a/gnome-initial-setup/gnome-initial-setup-copy-worker.c
+++ b/gnome-initial-setup/gnome-initial-setup-copy-worker.c
@@ -4,6 +4,7 @@
* sticks them in the user's profile */
#include <gio/gio.h>
+#include <stdlib.h>
#define SKELETON_PATH "gnome-initial-setup/skeleton"
@@ -33,13 +34,7 @@ move_file_from_tmpfs (GFile *src_base,
g_file_get_path (dest),
error->message);
}
- g_error_free (error);
}
-
- g_object_unref (dest_dir);
- g_object_unref (dest);
- g_object_unref (src);
- g_free (basename);
}
int
@@ -48,16 +43,13 @@ main (int argc,
{
GFile *src;
GError *error = NULL;
- int ret = 0;
g_type_init ();
src = g_file_new_for_path (get_skeleton_dir ());
if (!g_file_query_exists (src, NULL))
- goto out;
-
- ret = 1;
+ exit (EXIT_SUCCESS);
#define FILE(d, x) \
move_file_from_tmpfs (src, g_get_user_##d##_dir (), x)
@@ -70,12 +62,8 @@ main (int argc,
if (!g_file_delete (src, NULL, &error))
{
g_warning ("Unable to delete skeleton dir: %s", error->message);
- goto out;
+ exit (EXIT_FAILURE);
}
- ret = 0;
-
- out:
- g_object_unref (src);
- return ret;
+ return EXIT_SUCCESS;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]