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)
committerMichal Sekletar <msekleta@redhat.com>
Mon, 27 Aug 2018 10:21:13 +0000 (10:21 +0000)
commitc6903d1b42d1773fda4df6676618489ad760a2a1
tree3ef29e4bc1a9fe63fd9263e09170bfd8353d46ab
parent8618ef2fb30b4139c9bec4e45fb499cd8192a87f
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.

(cherry picked from commit 7ae8edcd03f74da123298330b76c3fc5425042ef)

Resolves: #1610397
src/libsystemd/sd-bus/bus-objects.c
src/libsystemd/sd-bus/sd-bus.c