diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-04-05 14:55:28 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-04-05 14:56:48 +0200 |
commit | b7f247e0befb6595049bc2410fe370e21d1f7444 (patch) | |
tree | 065da2dca8c05ba22e324da1747fe4648aeccb3b /src/libsystemd-bus/sd-bus.c | |
parent | d4100e2444fc78156a205bbb05703b31063e1248 (diff) |
bus: various improvements for test-bus-chat
Diffstat (limited to 'src/libsystemd-bus/sd-bus.c')
-rw-r--r-- | src/libsystemd-bus/sd-bus.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libsystemd-bus/sd-bus.c b/src/libsystemd-bus/sd-bus.c index 8b8ce3c03e..6f8d444a66 100644 --- a/src/libsystemd-bus/sd-bus.c +++ b/src/libsystemd-bus/sd-bus.c @@ -1314,7 +1314,12 @@ int sd_bus_send_with_reply_and_block( /* Found a match! */ if (incoming->header->type == SD_BUS_MESSAGE_TYPE_METHOD_RETURN) { - *reply = incoming; + + if (reply) + *reply = incoming; + else + sd_bus_message_unref(incoming); + return 0; } |