From: Zbigniew Jędrzejewski-Szmek Date: Fri, 16 May 2014 03:27:59 +0000 (-0400) Subject: bus: fix unitialized variable access in error path X-Git-Tag: v213~114 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=2915234da0c9f2f8727d91f04857e7b72d6721a9;ds=sidebyside bus: fix unitialized variable access in error path --- diff --git a/src/libsystemd/sd-bus/bus-objects.c b/src/libsystemd/sd-bus/bus-objects.c index 51d4a62ce..dbb04e5ec 100644 --- a/src/libsystemd/sd-bus/bus-objects.c +++ b/src/libsystemd/sd-bus/bus-objects.c @@ -1602,7 +1602,7 @@ static int add_object_vtable_internal( sd_bus_object_find_t find, void *userdata) { - sd_bus_slot *s; + sd_bus_slot *s = NULL; struct node_vtable *i, *existing = NULL; const sd_bus_vtable *v; struct node *n; diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c index ec2843ff7..1f1a4d3a1 100644 --- a/src/libsystemd/sd-bus/sd-bus.c +++ b/src/libsystemd/sd-bus/sd-bus.c @@ -2821,7 +2821,7 @@ _public_ int sd_bus_add_match( struct bus_match_component *components = NULL; unsigned n_components = 0; - sd_bus_slot *s; + sd_bus_slot *s = NULL; int r = 0; assert_return(bus, -EINVAL);