From 39f5ec857a31fe65e14cdf9b75927297e78015bb Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 3 Oct 2011 01:42:51 +0200 Subject: [PATCH] utils: fix existing node check when keep_old/no_delete is enabled --- utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- 2.25.1