]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-bus: free everything when bus_set_address_user fails (#6552)
authorEvgeny Vereshchagin <evvers@ya.ru>
Tue, 8 Aug 2017 06:42:51 +0000 (09:42 +0300)
committerLennart Poettering <lennart@poettering.net>
Tue, 8 Aug 2017 06:42:51 +0000 (08:42 +0200)
commit4f6631c8fcfc2a8b992a78ef73c2458f266d6245
tree3072d7e746bcdd825a7657be7156c05ee15278fd
parent5aece00d459e7a38178cfcd9f2d8767434840071
sd-bus: free everything when bus_set_address_user fails (#6552)

Fixes:
```
$ env -i valgrind --leak-check=full ./build/test-bus-chat
...
==7763== 1,888 (1,824 direct, 64 indirect) bytes in 1 blocks are
definitely lost in loss record 2 of 2
==7763==    at 0x4C2FA50: calloc (vg_replace_malloc.c:711)
==7763==    by 0x4F8FF9A: sd_bus_new (sd-bus.c:175)
==7763==    by 0x4F938BF: sd_bus_open_user (sd-bus.c:1138)
==7763==    by 0x109ACD: server_init (test-bus-chat.c:70)
==7763==    by 0x10BCF8: main (test-bus-chat.c:526)
==7763==
```

Closes #6481
src/libsystemd/sd-bus/sd-bus.c