fix a logic error leading to segfaults on updates
authorFelix Fietkau <nbd@openwrt.org>
Mon, 24 Oct 2011 18:46:07 +0000 (20:46 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 24 Oct 2011 18:46:07 +0000 (20:46 +0200)
utils.c

diff --git a/utils.c b/utils.c
index 521954639ee7b87b8a32ad6e95892c39401923d1..ba31b642947ea577ddcb9a98d2986f3e1a725d8e 100644 (file)
--- a/utils.c
+++ b/utils.c
@@ -39,7 +39,7 @@ 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)
+               if (tree->keep_old || tree->no_delete)
                        goto update_only;
 
                avl_delete(&tree->avl, anode);