Hey folks,
Regarding edbus, I believe that when sending a message, if it fails to
set_notify, it should cancel and unref the pending message. Another
thing, if the pending call doesn't complete, it should free data and
unref it too, right?
I'm attaching a small patch to fix it.
Please, somebody take a look at that when have some time.
Thanks,
By: Bruno Dilly <bdilly@profusion.mobi>
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/e_dbus@42081
7cbeb6ba-43b4-40fd-8cce-
4c39aea84d33
if (!dbus_pending_call_get_completed(pending))
{
printf("NOT COMPLETED\n");
+ free(data);
+ dbus_message_unref(msg);
+ dbus_pending_call_unref(pending);
return;
}
pdata->data = data;
if (!dbus_pending_call_set_notify(pending, cb_pending, pdata, free))
+ {
free(pdata);
+ dbus_message_unref(msg);
+ dbus_pending_call_cancel(pending);
+ return NULL;
+ }
}
return pending;