From 1f5741078873bd46cf818bfc3c2409193a18f019 Mon Sep 17 00:00:00 2001 From: Philipp Schafft Date: Thu, 26 Jul 2018 13:08:25 +0000 Subject: [PATCH] Fix: Actually insert nodes into the tree if they are new --- httpp/httpp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/httpp/httpp.c b/httpp/httpp.c index 0707973..40d4206 100644 --- a/httpp/httpp.c +++ b/httpp/httpp.c @@ -594,6 +594,8 @@ static void _httpp_set_param_nocopy(avl_tree *tree, char *name, char *value, int if (replace && found) { avl_delete(tree, (void *)found, _free_vars); avl_insert(tree, (void *)var); + } else if (!found) { + avl_insert(tree, (void *)var); } }