summaryrefslogtreecommitdiffstats
path: root/src/monitor/monitor_sbus.c
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2010-03-17 14:53:17 -0400
committerStephen Gallagher <sgallagh@redhat.com>2010-03-17 16:41:01 -0400
commitf1bc4e8b9daf04a5cb4b9464021bb9e816eed3ea (patch)
treee567f20493ad395a5f5b251f1f69cac6410a7789 /src/monitor/monitor_sbus.c
parent1d065874a1aa1db06994a16dae1a78555fabf776 (diff)
downloadsssd-f1bc4e8b9daf04a5cb4b9464021bb9e816eed3ea.tar.gz
sssd-f1bc4e8b9daf04a5cb4b9464021bb9e816eed3ea.tar.xz
sssd-f1bc4e8b9daf04a5cb4b9464021bb9e816eed3ea.zip
Fix a series of memory leaks in the SBUS
Diffstat (limited to 'src/monitor/monitor_sbus.c')
-rw-r--r--src/monitor/monitor_sbus.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/monitor/monitor_sbus.c b/src/monitor/monitor_sbus.c
index eedb60b3b..43e5b685e 100644
--- a/src/monitor/monitor_sbus.c
+++ b/src/monitor/monitor_sbus.c
@@ -111,6 +111,7 @@ int monitor_common_send_id(struct sbus_connection *conn,
{
DBusMessage *msg;
dbus_bool_t ret;
+ int retval;
/* create the message */
msg = dbus_message_new_method_call(NULL,
@@ -133,9 +134,11 @@ int monitor_common_send_id(struct sbus_connection *conn,
return EIO;
}
- return sbus_conn_send(conn, msg, 3000,
- id_callback,
- NULL, NULL);
+ retval = sbus_conn_send(conn, msg, 3000,
+ id_callback,
+ NULL, NULL);
+ dbus_message_unref(msg);
+ return retval;
}
int monitor_common_pong(DBusMessage *message,