Free service data in service_reply
authorZhenhua Zhang <zhenhua.zhang@intel.com>
Mon, 26 Jul 2010 01:11:36 +0000 (09:11 +0800)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 26 Jul 2010 09:16:21 +0000 (11:16 +0200)
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);