diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2003-04-08 18:22:52 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2003-04-08 18:22:52 +0000 |
commit | a150fde95df148d11fefb344163e1b7d25d4e06e (patch) | |
tree | a499225e2c40796d9ffde2c2464c6d976dc4254f /src | |
parent | a061ba837ed32323142f6505b7c18e46e76db422 (diff) | |
download | ipacct-a150fde95df148d11fefb344163e1b7d25d4e06e.tar.gz ipacct-a150fde95df148d11fefb344163e1b7d25d4e06e.tar.bz2 |
(list_free): Check if *listp is not null.
Diffstat (limited to 'src')
-rw-r--r-- | src/list.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -16,7 +16,7 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Generic singly-linked lists */ -/* $Id: list.c,v 1.3 2002/06/18 09:27:06 gray Exp $ */ +/* $Id: list.c,v 1.4 2003/04/08 18:22:52 gray Exp $ */ #ifdef HAVE_CONFIG_H # include <config.h> @@ -94,6 +94,8 @@ list_free(listp) { struct list_data *this, *next; + if (!*listp) + return; this = (*listp)->head; while (this) { next = this->next; |