From bcd75789d524e3e618ac02ed99f55321ea78ea24 Mon Sep 17 00:00:00 2001 From: George Oikonomou Date: Sat, 16 Dec 2017 01:15:25 +0000 Subject: [PATCH] Make sure we don't add the same item twice Fixes #254 --- os/lib/list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/lib/list.c b/os/lib/list.c index 605fe9c53..afa9df585 100644 --- a/os/lib/list.c +++ b/os/lib/list.c @@ -302,7 +302,7 @@ list_insert(list_t list, void *previtem, void *newitem) if(previtem == NULL) { list_push(list, newitem); } else { - + list_remove(list, newitem); ((struct list *)newitem)->next = ((struct list *)previtem)->next; ((struct list *)previtem)->next = newitem; }