]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-bus: when running user find function don't trust the value to be initialized
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 21 Apr 2019 20:25:03 +0000 (22:25 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 23 Apr 2019 20:58:39 +0000 (22:58 +0200)
The find function is externally provided, and we shouldn't trust that the
authors remember to set the output parameter in all cases.

src/libsystemd/sd-bus/bus-objects.c

index 6ed7cc4860e98106f8e8a9520c4847a5a9ce16a6..fe3b9feea6dfe1e83b5a309ef571577a5ce3d522 100644 (file)
@@ -22,7 +22,7 @@ static int node_vtable_get_userdata(
                 sd_bus_error *error) {
 
         sd_bus_slot *s;
-        void *u, *found_u;
+        void *u, *found_u = NULL;
         int r;
 
         assert(bus);