OSDN Git Service

gdbus: Fix memory leak on properties_set()
authorAnderson Lizardo <anderson.lizardo@openbossa.org>
Sun, 6 Jan 2013 00:47:46 +0000 (20:47 -0400)
committerJohan Hedberg <johan.hedberg@intel.com>
Sun, 6 Jan 2013 13:08:01 +0000 (15:08 +0200)
commitcb2169a0abbcc90dc4df3c2d5828af097db88e86
tree309dba4d20c8612749b6f3f78f34f4ba55aa8162
parentd4ed8789c1802ef5404d31d841ead3302580ef93
gdbus: Fix memory leak on properties_set()

The pointer returned by dbus_message_iter_get_signature() must be freed
with dbus_free().

Fixes this memory leak:

==1857== 16 bytes in 1 blocks are definitely lost in loss record 104 of
251
==1857==    at 0x402BF52: realloc (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==1857==    by 0x415E286: dbus_realloc (in
/lib/i386-linux-gnu/libdbus-1.so.3.5.8)
==1857==    by 0x415E70B: ??? (in
/lib/i386-linux-gnu/libdbus-1.so.3.5.8)
==1857==    by 0x415F17B: ??? (in
/lib/i386-linux-gnu/libdbus-1.so.3.5.8)
==1857==    by 0x414CB33: dbus_message_iter_get_signature (in
/lib/i386-linux-gnu/libdbus-1.so.3.5.8)
==1857==    by 0x8053239: properties_set (object.c:899)
==1857==    by 0x5FFFFF: ???
==1857==
gdbus/object.c