From dd19d6f5c7e0b335301a3f3e3d21bffb8c83e558 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Mon, 31 Jan 2022 06:29:17 +0100 Subject: hashtable bugfix --- ecp/src/htable/hashtable.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ecp/src/htable/hashtable.c') diff --git a/ecp/src/htable/hashtable.c b/ecp/src/htable/hashtable.c index 1891f1b..36c8a6d 100755 --- a/ecp/src/htable/hashtable.c +++ b/ecp/src/htable/hashtable.c @@ -217,6 +217,7 @@ hashtable_remove(struct hashtable *h, void *k) struct entry *e; void *v; e = hashtable_remove_static(h,k); + if (NULL == e) return NULL; v = e->v; freekey(e->k); free(e); @@ -240,7 +241,7 @@ hashtable_remove_static(struct hashtable *h, void *k) { *pE = e->next; h->entrycount--; - return e->v; + return e; } pE = &(e->next); e = e->next; -- cgit v1.2.3