summaryrefslogtreecommitdiff
path: root/ecp/src/htable/hashtable.c
diff options
context:
space:
mode:
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;