summaryrefslogtreecommitdiff
path: root/src/libsystemd
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-08-17 11:30:31 +0200
committerLennart Poettering <lennart@poettering.net>2015-08-17 11:30:31 +0200
commitaaa2a3abf9b3f027918b60fe0d0340fcd4874291 (patch)
tree20ffef498556100193946c2bc6c5f6da51a4166d /src/libsystemd
parent22175a39e8df964b26def7988b841b348de9c97a (diff)
parent3e044c492e3ebe64f4e3175c94f9db8a62557b82 (diff)
Merge pull request #976 from elfring/Remove_unnecessary_checks2
Delete unnecessary checks before some function calls
Diffstat (limited to 'src/libsystemd')
-rw-r--r--src/libsystemd/sd-bus/bus-message.c6
-rw-r--r--src/libsystemd/sd-bus/test-bus-chat.c4
2 files changed, 2 insertions, 8 deletions
diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c
index b52285403f..a212f0b398 100644
--- a/src/libsystemd/sd-bus/bus-message.c
+++ b/src/libsystemd/sd-bus/bus-message.c
@@ -143,11 +143,7 @@ static void message_free(sd_bus_message *m) {
if (m->iovec != m->iovec_fixed)
free(m->iovec);
- if (m->destination_ptr) {
- free(m->destination_ptr);
- m->destination_ptr = NULL;
- }
-
+ m->destination_ptr = mfree(m->destination_ptr);
message_reset_containers(m);
free(m->root_container.signature);
free(m->root_container.offsets);
diff --git a/src/libsystemd/sd-bus/test-bus-chat.c b/src/libsystemd/sd-bus/test-bus-chat.c
index b97729caf7..a0aecc1f55 100644
--- a/src/libsystemd/sd-bus/test-bus-chat.c
+++ b/src/libsystemd/sd-bus/test-bus-chat.c
@@ -118,9 +118,7 @@ static int server_init(sd_bus **_bus) {
return 0;
fail:
- if (bus)
- sd_bus_unref(bus);
-
+ sd_bus_unref(bus);
return r;
}