diff options
author | Rob Landley | 2006-05-11 18:25:24 +0000 |
---|---|---|
committer | Rob Landley | 2006-05-11 18:25:24 +0000 |
commit | cc848ddbf82500fd0d8c42c0e77b5c456805095b (patch) | |
tree | 069cdabe857272bb415df0aa308ef2ffe887af86 | |
parent | 0690d1591fa7582132471eba7a3e46816631307e (diff) | |
download | busybox-cc848ddbf82500fd0d8c42c0e77b5c456805095b.zip busybox-cc848ddbf82500fd0d8c42c0e77b5c456805095b.tar.gz |
Bug fix from Vladimir Oleynik, and suggestion I add my copyright notice
to the file.
-rw-r--r-- | libbb/llist.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libbb/llist.c b/libbb/llist.c index 0d599db..842e8f7 100644 --- a/libbb/llist.c +++ b/libbb/llist.c @@ -5,6 +5,7 @@ * Copyright (C) 2003 Glenn McGrath * Copyright (C) 2005 Vladimir Oleynik * Copyright (C) 2005 Bernhard Fischer + * Copyright (C) 2006 Rob Landley <rob@landley.net> * * Licensed under the GPL v2, see the file LICENSE in this tarball. */ @@ -57,8 +58,8 @@ void *llist_pop(llist_t **head) else { void *next = (*head)->link; data = (*head)->data; - *head = (*head)->link; - free(next); + free(*head); + *head = next; } return data; |