aboutsummaryrefslogtreecommitdiff
path: root/src/list.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/list.c')
-rw-r--r--src/list.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/list.c b/src/list.c
index e7f69f7..2d57fe0 100644
--- a/src/list.c
+++ b/src/list.c
@@ -82,7 +82,7 @@ grecs_list_remove_entry(struct grecs_list *lp, struct grecs_list_entry *ent)
p->prev = ent->prev;
else
lp->tail = ent->prev;
- ent->next = ent->prev = NULL;
+ grecs_free(ent);
lp->count--;
}
@@ -127,7 +127,6 @@ grecs_list_pop(struct grecs_list *lp)
if (ep) {
data = ep->data;
grecs_list_remove_entry(lp, ep);
- grecs_free(ep);
} else
data = NULL;
return data;
@@ -144,7 +143,6 @@ grecs_list_remove_tail(struct grecs_list *lp)
ep = lp->tail;
data = lp->tail->data;
grecs_list_remove_entry(lp, ep);
- grecs_free(ep);
return data;
}

Return to:

Send suggestions and report system problems to the System administrator.