diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-11-16 01:14:38 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-11-16 01:35:44 +0100 |
commit | 69f1c33425f173bc7f8471d1075c916f83866c82 (patch) | |
tree | ea9d1dfcc3befa54c59dd5209148390d0fb7e4b7 /src/libsystemd/sd-bus | |
parent | test: several cleanups for test-bus-chat (diff) | |
download | systemd-69f1c33425f173bc7f8471d1075c916f83866c82.tar.xz systemd-69f1c33425f173bc7f8471d1075c916f83866c82.zip |
test: sd_bus_process() may assign NULL even if it returns positive
Let's not trigger assert_return() needlessly.
Prompted by #30029.
Diffstat (limited to 'src/libsystemd/sd-bus')
-rw-r--r-- | src/libsystemd/sd-bus/test-bus-peersockaddr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd/sd-bus/test-bus-peersockaddr.c b/src/libsystemd/sd-bus/test-bus-peersockaddr.c index 4774ef6a4c..79556e8a85 100644 --- a/src/libsystemd/sd-bus/test-bus-peersockaddr.c +++ b/src/libsystemd/sd-bus/test-bus-peersockaddr.c @@ -65,7 +65,7 @@ static void *server(void *p) { continue; } - if (sd_bus_message_is_method_call(m, "foo.foo", "Foo") > 0) { + if (m && sd_bus_message_is_method_call(m, "foo.foo", "Foo") > 0) { assert_se(sd_bus_reply_method_return(m, "s", "bar") >= 0); break; } |