diff options
author | Alexandre Rostovtsev <tetromino@gentoo.org> | 2012-09-05 12:12:37 -0400 |
---|---|---|
committer | Alexandre Rostovtsev <tetromino@gentoo.org> | 2012-09-05 12:12:37 -0400 |
commit | 85d40b110c5ae791d1d0c7546adf632bcae032b4 (patch) | |
tree | 030dac48be7a0b2ed34c9637971cf3f48fd529ee /src | |
parent | Finish SetVConsoleKeyboard() and SetX11Keyboard() implementation (diff) | |
download | openrc-settingsd-85d40b110c5ae791d1d0c7546adf632bcae032b4.tar.gz openrc-settingsd-85d40b110c5ae791d1d0c7546adf632bcae032b4.tar.bz2 openrc-settingsd-85d40b110c5ae791d1d0c7546adf632bcae032b4.zip |
Cleanup to make valgrind happy
Diffstat (limited to 'src')
-rw-r--r-- | src/shell-utils.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/shell-utils.c b/src/shell-utils.c index 545c5dd..f5c9b20 100644 --- a/src/shell-utils.c +++ b/src/shell-utils.c @@ -54,7 +54,7 @@ shell_utils_source_var (GFile *file, GError **error) { gchar *argv[4] = { "sh", "-c", NULL, NULL }; - gchar *filename, *quoted_filename; + gchar *filename = NULL, *quoted_filename = NULL; gchar *output = NULL; GFileInfo *info; const GFileAttributeInfo *attribute_info; @@ -88,10 +88,8 @@ shell_utils_source_var (GFile *file, } out: - if (filename != NULL) - g_free (filename); - if (quoted_filename != NULL) - g_free (quoted_filename); + g_free (filename); + g_free (quoted_filename); if (info != NULL) g_object_unref (info); if (argv[2] != NULL) |