* [PATCH v2] watch: Free service data in service_reply
@ 2010-07-26 1:11 Zhenhua Zhang
2010-07-26 9:33 ` Johan Hedberg
0 siblings, 1 reply; 3+ messages in thread
From: Zhenhua Zhang @ 2010-07-26 1:11 UTC (permalink / raw)
To: linux-bluetooth
Avoid the memory leak of server_data.
---
gdbus/watch.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gdbus/watch.c b/gdbus/watch.c
index 1d479fa..29f23e2 100644
--- a/gdbus/watch.c
+++ b/gdbus/watch.c
@@ -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);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] watch: Free service data in service_reply
2010-07-26 1:11 [PATCH v2] watch: Free service data in service_reply Zhenhua Zhang
@ 2010-07-26 9:33 ` Johan Hedberg
2010-07-26 9:38 ` Zhang, Zhenhua
0 siblings, 1 reply; 3+ messages in thread
From: Johan Hedberg @ 2010-07-26 9:33 UTC (permalink / raw)
To: Zhenhua Zhang; +Cc: linux-bluetooth
Hi,
On Mon, Jul 26, 2010, Zhenhua Zhang wrote:
> Avoid the memory leak of server_data.
> ---
> gdbus/watch.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/gdbus/watch.c b/gdbus/watch.c
> index 1d479fa..29f23e2 100644
> --- a/gdbus/watch.c
> +++ b/gdbus/watch.c
> @@ -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);
Thanks for the updated patch. It has now been pushed both to bluez and
obexd upstream trees with a fixed commit message (e.g. your summary line
was not truthful anymore since the data isn't being freed in
service_reply but by libdbus itself.
Johan
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH v2] watch: Free service data in service_reply
2010-07-26 9:33 ` Johan Hedberg
@ 2010-07-26 9:38 ` Zhang, Zhenhua
0 siblings, 0 replies; 3+ messages in thread
From: Zhang, Zhenhua @ 2010-07-26 9:38 UTC (permalink / raw)
To: Johan Hedberg; +Cc: linux-bluetooth@vger.kernel.org
Hi Johan,
Johan Hedberg wrote:
> Hi,
>
> On Mon, Jul 26, 2010, Zhenhua Zhang wrote:
>> Avoid the memory leak of server_data.
>> ---
>> gdbus/watch.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/gdbus/watch.c b/gdbus/watch.c
>> index 1d479fa..29f23e2 100644
>> --- a/gdbus/watch.c
>> +++ b/gdbus/watch.c
>> @@ -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);
>
> Thanks for the updated patch. It has now been pushed both to bluez and
> obexd upstream trees with a fixed commit message (e.g. your summary
> line was not truthful anymore since the data isn't being freed in
> service_reply but by libdbus itself.
>
> Johan
Thanks. Will pay attention to the commit title next time.
Regards,
Zhenhua
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-07-26 9:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-26 1:11 [PATCH v2] watch: Free service data in service_reply Zhenhua Zhang
2010-07-26 9:33 ` Johan Hedberg
2010-07-26 9:38 ` Zhang, Zhenhua
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox