dbus: memory leak, free pending calls

This commit is contained in:
Lennart Poettering 2009-04-10 01:14:46 +02:00
parent 9ba9883693
commit 669703daec

View file

@ -380,8 +380,10 @@ pa_dbus_pending *pa_dbus_pending_new(
void pa_dbus_pending_free(pa_dbus_pending *p) { void pa_dbus_pending_free(pa_dbus_pending *p) {
pa_assert(p); pa_assert(p);
if (p->pending) if (p->pending) {
dbus_pending_call_cancel(p->pending); /* p->pending is freed by cancel() */ dbus_pending_call_cancel(p->pending);
dbus_pending_call_unref(p->pending);
}
if (p->message) if (p->message)
dbus_message_unref(p->message); dbus_message_unref(p->message);