Bug fix from Vladimir Oleynik, and suggestion I add my copyright notice
to the file.
This commit is contained in:
parent
0690d1591f
commit
cc848ddbf8
@ -5,6 +5,7 @@
|
|||||||
* Copyright (C) 2003 Glenn McGrath
|
* Copyright (C) 2003 Glenn McGrath
|
||||||
* Copyright (C) 2005 Vladimir Oleynik
|
* Copyright (C) 2005 Vladimir Oleynik
|
||||||
* Copyright (C) 2005 Bernhard Fischer
|
* 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.
|
* Licensed under the GPL v2, see the file LICENSE in this tarball.
|
||||||
*/
|
*/
|
||||||
@ -57,8 +58,8 @@ void *llist_pop(llist_t **head)
|
|||||||
else {
|
else {
|
||||||
void *next = (*head)->link;
|
void *next = (*head)->link;
|
||||||
data = (*head)->data;
|
data = (*head)->data;
|
||||||
*head = (*head)->link;
|
free(*head);
|
||||||
free(next);
|
*head = next;
|
||||||
}
|
}
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
Loading…
Reference in New Issue
Block a user