From 88f9dca0dc323c85c9f4f52ab848fbdc91f5e120 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Mon, 2 Mar 2009 13:28:12 -0500 Subject: [PATCH] nm-tool: fix uninitialized variable warning (debian #517520) --- test/nm-tool.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/nm-tool.c b/test/nm-tool.c index cc00a1debb..375eaaec82 100644 --- a/test/nm-tool.c +++ b/test/nm-tool.c @@ -508,7 +508,7 @@ get_one_connection (DBusGConnection *bus, GHashTable *table) { DBusGProxy *proxy; - NMConnection *connection; + NMConnection *connection = NULL; const char *service; GError *error = NULL; GHashTable *settings = NULL; @@ -549,7 +549,8 @@ get_one_connection (DBusGConnection *bus, out: g_clear_error (&error); - g_object_unref (connection); + if (connection) + g_object_unref (connection); g_object_unref (proxy); }