[gnome-color-manager] Fix a trivial memory leak in gcm-inspect
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-color-manager] Fix a trivial memory leak in gcm-inspect
- Date: Tue, 25 May 2010 11:17:41 +0000 (UTC)
commit 696eda656616857c7f22b81ecb2ccb9b2cba6d07
Author: Richard Hughes <richard hughsie com>
Date: Tue May 25 12:05:54 2010 +0100
Fix a trivial memory leak in gcm-inspect
src/gcm-inspect.c | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/src/gcm-inspect.c b/src/gcm-inspect.c
index 4a0c72c..8f7cdc2 100644
--- a/src/gcm-inspect.c
+++ b/src/gcm-inspect.c
@@ -165,7 +165,7 @@ gcm_inspect_show_profiles_for_device (const gchar *device_id)
guint i = 0;
GDBusConnection *connection;
GError *error = NULL;
- GVariant *args;
+ GVariant *args = NULL;
GVariant *response = NULL;
GVariantIter *iter = NULL;
@@ -215,6 +215,8 @@ gcm_inspect_show_profiles_for_device (const gchar *device_id)
out:
if (iter != NULL)
g_variant_iter_free (iter);
+ if (args != NULL)
+ g_variant_unref (args);
if (response != NULL)
g_variant_unref (response);
return ret;
@@ -231,7 +233,7 @@ gcm_inspect_show_profiles_for_file (const gchar *filename)
guint i = 0;
GDBusConnection *connection;
GError *error = NULL;
- GVariant *args;
+ GVariant *args = NULL;
GVariant *response = NULL;
GVariantIter *iter = NULL;
@@ -281,6 +283,8 @@ gcm_inspect_show_profiles_for_file (const gchar *filename)
out:
if (iter != NULL)
g_variant_iter_free (iter);
+ if (args != NULL)
+ g_variant_unref (args);
if (response != NULL)
g_variant_unref (response);
return ret;
@@ -355,7 +359,7 @@ gcm_inspect_show_profile_for_window (guint xid)
GDBusConnection *connection;
GError *error = NULL;
const gchar *profile;
- GVariant *args;
+ GVariant *args = NULL;
GVariant *response = NULL;
GVariant *response_child = NULL;
GVariantIter *iter = NULL;
@@ -406,6 +410,8 @@ gcm_inspect_show_profile_for_window (guint xid)
out:
if (iter != NULL)
g_variant_iter_free (iter);
+ if (args != NULL)
+ g_variant_unref (args);
if (response != NULL)
g_variant_unref (response);
return ret;
@@ -423,7 +429,7 @@ gcm_inspect_show_profiles_for_type (const gchar *type)
const gchar *filename;
const gchar *description;
guint i;
- GVariant *args;
+ GVariant *args = NULL;
GVariant *response = NULL;
GVariantIter *iter = NULL;
@@ -473,6 +479,8 @@ gcm_inspect_show_profiles_for_type (const gchar *type)
out:
if (iter != NULL)
g_variant_iter_free (iter);
+ if (args != NULL)
+ g_variant_unref (args);
if (response != NULL)
g_variant_unref (response);
return ret;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]