[systemd-commits] src/libsystemd-bus

Colin Walters walters at kemper.freedesktop.org
Sun Dec 15 17:40:12 PST 2013


 src/libsystemd-bus/bus-objects.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8e050193e17ed002f7608ba1b1fe3371a8bb182c
Author: Colin Walters <walters at verbum.org>
Date:   Sun Dec 15 20:23:23 2013 -0500

    Fix segv introduced by 2fd069b18e525860514a70d3ea08410ca122d3e2
    
    n->path is pointing to the value now, we set s = NULL above.

diff --git a/src/libsystemd-bus/bus-objects.c b/src/libsystemd-bus/bus-objects.c
index 5aa83a4..54ed754 100644
--- a/src/libsystemd-bus/bus-objects.c
+++ b/src/libsystemd-bus/bus-objects.c
@@ -1379,7 +1379,7 @@ static struct node *bus_node_allocate(sd_bus *bus, const char *path) {
         n->path = s;
         s = NULL; /* do not free */
 
-        r = hashmap_put(bus->nodes, s, n);
+        r = hashmap_put(bus->nodes, n->path, n);
         if (r < 0) {
                 free(n->path);
                 free(n);



More information about the systemd-commits mailing list