summaryrefslogtreecommitdiff
path: root/tools/supplicant-dbus.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-12-31 19:54:49 -0800
committerMarcel Holtmann <marcel@holtmann.org>2009-12-31 19:54:49 -0800
commit3150ca3c9379ebf811d26dace9153f19a0569080 (patch)
tree13da975e9a0f72967cd903a2c64575d8fd34d972 /tools/supplicant-dbus.c
parentea8409faf51774bdc23b1f611c0364ea13a4b88f (diff)
downloadconnman-3150ca3c9379ebf811d26dace9153f19a0569080.tar.gz
connman-3150ca3c9379ebf811d26dace9153f19a0569080.tar.bz2
connman-3150ca3c9379ebf811d26dace9153f19a0569080.zip
Fix memory leaks within D-Bus helpers
Diffstat (limited to 'tools/supplicant-dbus.c')
-rw-r--r--tools/supplicant-dbus.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/supplicant-dbus.c b/tools/supplicant-dbus.c
index c95f2e77..79e75603 100644
--- a/tools/supplicant-dbus.c
+++ b/tools/supplicant-dbus.c
@@ -110,8 +110,6 @@ static void property_get_all_reply(DBusPendingCall *call, void *user_data)
DBusMessageIter iter;
reply = dbus_pending_call_steal_reply(call);
- if (reply == NULL)
- return;
if (dbus_message_get_type(reply) == DBUS_MESSAGE_TYPE_ERROR)
goto done;
@@ -127,6 +125,8 @@ static void property_get_all_reply(DBusPendingCall *call, void *user_data)
done:
dbus_message_unref(reply);
+
+ dbus_pending_call_unref(call);
}
int supplicant_dbus_property_get_all(const char *path, const char *interface,
@@ -195,8 +195,6 @@ static void property_set_reply(DBusPendingCall *call, void *user_data)
const char *error;
reply = dbus_pending_call_steal_reply(call);
- if (reply == NULL)
- return;
if (dbus_message_get_type(reply) == DBUS_MESSAGE_TYPE_ERROR)
error = dbus_message_get_error_name(reply);
@@ -211,6 +209,8 @@ static void property_set_reply(DBusPendingCall *call, void *user_data)
done:
dbus_message_unref(reply);
+
+ dbus_pending_call_unref(call);
}
int supplicant_dbus_property_set(const char *path, const char *interface,
@@ -292,8 +292,6 @@ static void method_call_reply(DBusPendingCall *call, void *user_data)
const char *error;
reply = dbus_pending_call_steal_reply(call);
- if (reply == NULL)
- return;
if (dbus_message_get_type(reply) == DBUS_MESSAGE_TYPE_ERROR)
error = dbus_message_get_error_name(reply);
@@ -308,6 +306,8 @@ static void method_call_reply(DBusPendingCall *call, void *user_data)
done:
dbus_message_unref(reply);
+
+ dbus_pending_call_unref(call);
}
int supplicant_dbus_method_call(const char *path,