Free service data in service_reply
authorZhenhua Zhang <zhenhua.zhang@intel.com>
Mon, 26 Jul 2010 01:11:36 +0000 (09:11 +0800)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 26 Jul 2010 14:30:48 +0000 (07:30 -0700)
Avoid the memory leak of server_data.

gdbus/watch.c

index 1d479fa..29f23e2 100644 (file)
@@ -533,7 +533,7 @@ static void check_service(DBusConnection *connection, const char *name,
                goto done;
        }
 
-       dbus_pending_call_set_notify(call, service_reply, data, NULL);
+       dbus_pending_call_set_notify(call, service_reply, data, g_free);
 
        dbus_pending_call_unref(call);