key to data elements point at wrong memory area
authorSteven Barth <steven@midlink.org>
Wed, 16 Oct 2013 09:58:12 +0000 (11:58 +0200)
committerSteven Barth <steven@midlink.org>
Thu, 17 Oct 2013 14:52:16 +0000 (16:52 +0200)
interface.c

index a79de4a..0620617 100644 (file)
@@ -151,7 +151,7 @@ interface_add_data(struct interface *iface, const struct blob_attr *data)
 
        n = calloc(1, sizeof(*n) + blob_pad_len(data));
        memcpy(n->data, data, blob_pad_len(data));
-       n->node.key = blobmsg_name(data);
+       n->node.key = blobmsg_name(n->data);
 
        o = avl_find_element(&iface->data, n->node.key, o, node);
        if (o)