summaryrefslogtreecommitdiffhomepage
path: root/utils.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-10-03 01:42:51 +0200
committerFelix Fietkau <nbd@openwrt.org>2011-10-03 01:42:51 +0200
commit39f5ec857a31fe65e14cdf9b75927297e78015bb (patch)
tree927adabee30df9b6a6408dfeb5bd19c65f308712 /utils.c
parent14fae227e03e69df2bf8af4c1490929459727ca8 (diff)
utils: fix existing node check when keep_old/no_delete is enabled
Diffstat (limited to 'utils.c')
-rw-r--r--utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils.c b/utils.c
index 31a5967..5219546 100644
--- a/utils.c
+++ b/utils.c
@@ -38,10 +38,10 @@ vlist_add(struct vlist_tree *tree, struct vlist_node *node)
anode = avl_find(&tree->avl, key);
if (anode) {
+ old_node = container_of(anode, struct vlist_node, avl);
if (tree->keep_old || !tree->no_delete)
goto update_only;
- old_node = container_of(anode, struct vlist_node, avl);
avl_delete(&tree->avl, anode);
}