chiark / gitweb /
bus: fix unitialized variable access in error path
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 16 May 2014 03:27:59 +0000 (23:27 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 16 May 2014 22:03:00 +0000 (18:03 -0400)
src/libsystemd/sd-bus/bus-objects.c
src/libsystemd/sd-bus/sd-bus.c

index 51d4a62cee1bd1e96e15d325fe1edb75aeb79791..dbb04e5ec6505973af821fe8220c5a4c27a78494 100644 (file)
@@ -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;
index ec2843ff73fda36b44ed10bb235dfcbcb2865bef..1f1a4d3a1425f2830ff82b0c64f5bd0518dbc530 100644 (file)
@@ -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);