From: Zbigniew Jędrzejewski-Szmek Date: Sun, 21 Apr 2019 20:25:03 +0000 (+0200) Subject: sd-bus: when running user find function don't trust the value to be initialized X-Git-Tag: v243-rc1~531^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf135d288d11c1da6b053dfe26ffa708031d544f;p=thirdparty%2Fsystemd.git sd-bus: when running user find function don't trust the value to be initialized The find function is externally provided, and we shouldn't trust that the authors remember to set the output parameter in all cases. --- diff --git a/src/libsystemd/sd-bus/bus-objects.c b/src/libsystemd/sd-bus/bus-objects.c index 6ed7cc4860e..fe3b9feea6d 100644 --- a/src/libsystemd/sd-bus/bus-objects.c +++ b/src/libsystemd/sd-bus/bus-objects.c @@ -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);