]> git.ipfire.org Git - thirdparty/systemd.git/commit
bus: move BUS_DONT_DESTROY calls after asserts
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 18 Jul 2018 10:16:33 +0000 (12:16 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 18 Jul 2018 10:16:33 +0000 (12:16 +0200)
commit7ae8edcd03f74da123298330b76c3fc5425042ef
tree4f4daa06bddb2adf3e26f821b9aec481b1c2d422
parent57916ea352b85153ecbed803d52861ca8b933dd3
bus: move BUS_DONT_DESTROY calls after asserts

It's not useful to bump the reference count before checking if the object is
NULL. Thanks to d40f5cc498 we can do this ;).

Related to https://bugzilla.redhat.com/show_bug.cgi?id=1576084,
https://bugzilla.redhat.com/show_bug.cgi?id=1575340,
https://bugzilla.redhat.com/show_bug.cgi?id=1575350. I'm not sure why those two
people hit this code path, while most people don't. At least we won't abort.
src/libsystemd/sd-bus/bus-objects.c
src/libsystemd/sd-bus/sd-bus.c