summaryrefslogtreecommitdiff
path: root/ecp/src/htable/hashtable.c
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2022-01-31 06:29:17 +0100
committerUros Majstorovic <majstor@majstor.org>2022-01-31 06:29:17 +0100
commitdd19d6f5c7e0b335301a3f3e3d21bffb8c83e558 (patch)
tree0841609c7e1c56cf95419d98c0074e6a2768acda /ecp/src/htable/hashtable.c
parent9f5c5c6263383cc7d6fb03f949465df5a02734b1 (diff)
hashtable bugfix
Diffstat (limited to 'ecp/src/htable/hashtable.c')
-rwxr-xr-xecp/src/htable/hashtable.c3
1 files changed, 2 insertions, 1 deletions
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;