aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2006-05-11 18:25:24 +0000
committerRob Landley <rob@landley.net>2006-05-11 18:25:24 +0000
commitcc848ddbf82500fd0d8c42c0e77b5c456805095b (patch)
tree069cdabe857272bb415df0aa308ef2ffe887af86 /libbb
parent0690d1591fa7582132471eba7a3e46816631307e (diff)
downloadbusybox-w32-cc848ddbf82500fd0d8c42c0e77b5c456805095b.tar.gz
busybox-w32-cc848ddbf82500fd0d8c42c0e77b5c456805095b.tar.bz2
busybox-w32-cc848ddbf82500fd0d8c42c0e77b5c456805095b.zip
Bug fix from Vladimir Oleynik, and suggestion I add my copyright notice
to the file.
Diffstat (limited to 'libbb')
-rw-r--r--libbb/llist.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libbb/llist.c b/libbb/llist.c
index 0d599db6b..842e8f7bb 100644
--- a/libbb/llist.c
+++ b/libbb/llist.c
@@ -5,6 +5,7 @@
5 * Copyright (C) 2003 Glenn McGrath 5 * Copyright (C) 2003 Glenn McGrath
6 * Copyright (C) 2005 Vladimir Oleynik 6 * Copyright (C) 2005 Vladimir Oleynik
7 * Copyright (C) 2005 Bernhard Fischer 7 * Copyright (C) 2005 Bernhard Fischer
8 * Copyright (C) 2006 Rob Landley <rob@landley.net>
8 * 9 *
9 * Licensed under the GPL v2, see the file LICENSE in this tarball. 10 * Licensed under the GPL v2, see the file LICENSE in this tarball.
10 */ 11 */
@@ -57,8 +58,8 @@ void *llist_pop(llist_t **head)
57 else { 58 else {
58 void *next = (*head)->link; 59 void *next = (*head)->link;
59 data = (*head)->data; 60 data = (*head)->data;
60 *head = (*head)->link; 61 free(*head);
61 free(next); 62 *head = next;
62 } 63 }
63 64
64 return data; 65 return data;