summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJosé Roberto de Souza <zehortigoza@profusion.mobi>2013-01-02 20:31:46 +0000
committerLucas De Marchi <lucas.demarchi@profusion.mobi>2013-01-02 20:31:46 +0000
commit42af9b1629673511e61dab39d35598ffd9aed0f1 (patch)
tree21fabfa8e4b9f6f7d14d97b7b4d239e86cb847f9 /src
parentd70f74dc2f00a337ea733bfe4b0d73f2b07dbed1 (diff)
edbus: Remove message leaks
Patch by: José Roberto de Souza <zehortigoza@profusion.mobi> SVN revision: 82009
Diffstat (limited to 'src')
-rw-r--r--src/lib/edbus/edbus_freedesktop.c5
-rw-r--r--src/lib/edbus/edbus_object.c15
2 files changed, 16 insertions, 4 deletions
diff --git a/src/lib/edbus/edbus_freedesktop.c b/src/lib/edbus/edbus_freedesktop.c
index 7f58b1dd8f..bf5c50d3d3 100644
--- a/src/lib/edbus/edbus_freedesktop.c
+++ b/src/lib/edbus/edbus_freedesktop.c
@@ -74,7 +74,10 @@ EAPI EDBus_Pending *
74edbus_object_managed_objects_get(EDBus_Object *obj, EDBus_Message_Cb cb, const void *data) 74edbus_object_managed_objects_get(EDBus_Object *obj, EDBus_Message_Cb cb, const void *data)
75{ 75{
76 EDBus_Message *msg; 76 EDBus_Message *msg;
77 EDBus_Pending *p;
77 msg = edbus_object_method_call_new(obj, EDBUS_FDO_INTERFACE_OBJECT_MANAGER, 78 msg = edbus_object_method_call_new(obj, EDBUS_FDO_INTERFACE_OBJECT_MANAGER,
78 "GetManagedObjects"); 79 "GetManagedObjects");
79 return edbus_object_send(obj, msg, cb, data, -1); 80 p = edbus_object_send(obj, msg, cb, data, -1);
81 edbus_message_unref(msg);
82 return p;
80} 83}
diff --git a/src/lib/edbus/edbus_object.c b/src/lib/edbus/edbus_object.c
index 34c5c0c304..6b2c55d7fa 100644
--- a/src/lib/edbus/edbus_object.c
+++ b/src/lib/edbus/edbus_object.c
@@ -644,27 +644,36 @@ EAPI EDBus_Pending *
644edbus_object_peer_ping(EDBus_Object *obj, EDBus_Message_Cb cb, const void *data) 644edbus_object_peer_ping(EDBus_Object *obj, EDBus_Message_Cb cb, const void *data)
645{ 645{
646 EDBus_Message *msg; 646 EDBus_Message *msg;
647 EDBus_Pending *p;
647 EDBUS_OBJECT_CHECK_RETVAL(obj, NULL); 648 EDBUS_OBJECT_CHECK_RETVAL(obj, NULL);
648 msg = edbus_object_method_call_new(obj, EDBUS_FDO_INTEFACE_PEER, "Ping"); 649 msg = edbus_object_method_call_new(obj, EDBUS_FDO_INTEFACE_PEER, "Ping");
649 return edbus_object_send(obj, msg, cb, data, -1); 650 p = edbus_object_send(obj, msg, cb, data, -1);
651 edbus_message_unref(msg);
652 return p;
650} 653}
651 654
652EAPI EDBus_Pending * 655EAPI EDBus_Pending *
653edbus_object_peer_machine_id_get(EDBus_Object *obj, EDBus_Message_Cb cb, const void *data) 656edbus_object_peer_machine_id_get(EDBus_Object *obj, EDBus_Message_Cb cb, const void *data)
654{ 657{
655 EDBus_Message *msg; 658 EDBus_Message *msg;
659 EDBus_Pending *p;
656 EDBUS_OBJECT_CHECK_RETVAL(obj, NULL); 660 EDBUS_OBJECT_CHECK_RETVAL(obj, NULL);
657 msg = edbus_object_method_call_new(obj, EDBUS_FDO_INTEFACE_PEER, 661 msg = edbus_object_method_call_new(obj, EDBUS_FDO_INTEFACE_PEER,
658 "GetMachineId"); 662 "GetMachineId");
659 return edbus_object_send(obj, msg, cb, data, -1); 663 p = edbus_object_send(obj, msg, cb, data, -1);
664 edbus_message_unref(msg);
665 return p;
660} 666}
661 667
662EAPI EDBus_Pending * 668EAPI EDBus_Pending *
663edbus_object_introspect(EDBus_Object *obj, EDBus_Message_Cb cb, const void *data) 669edbus_object_introspect(EDBus_Object *obj, EDBus_Message_Cb cb, const void *data)
664{ 670{
665 EDBus_Message *msg; 671 EDBus_Message *msg;
672 EDBus_Pending *p;
666 EDBUS_OBJECT_CHECK_RETVAL(obj, NULL); 673 EDBUS_OBJECT_CHECK_RETVAL(obj, NULL);
667 msg = edbus_object_method_call_new(obj, EDBUS_FDO_INTERFACE_INTROSPECTABLE, 674 msg = edbus_object_method_call_new(obj, EDBUS_FDO_INTERFACE_INTROSPECTABLE,
668 "Introspect"); 675 "Introspect");
669 return edbus_object_send(obj, msg, cb, data, -1); 676 p = edbus_object_send(obj, msg, cb, data, -1);
677 edbus_message_unref(msg);
678 return p;
670} 679}