From: Felix Fietkau Date: Thu, 20 Dec 2012 16:43:47 +0000 (+0100) Subject: fix stale vlist/avl key for instance names X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ac94141916ea0731f507055dcf294c8cdcb37a4d;p=oweals%2Fprocd.git fix stale vlist/avl key for instance names Signed-off-by: Felix Fietkau --- diff --git a/service.c b/service.c index 27ed8c0..64ef3e8 100644 --- a/service.c +++ b/service.c @@ -10,7 +10,6 @@ static void service_instance_add(struct service *s, struct blob_attr *attr) { struct service_instance *in; - const char *name = blobmsg_name(attr); if (blobmsg_type(attr) != BLOBMSG_TYPE_TABLE) return; @@ -20,7 +19,7 @@ service_instance_add(struct service *s, struct blob_attr *attr) return; instance_init(in, s, attr); - vlist_add(&s->instances, &in->node, (void *) name); + vlist_add(&s->instances, &in->node, (void *) in->name); } static void