aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2003-04-08 18:22:52 +0000
committerSergey Poznyakoff <gray@gnu.org.ua>2003-04-08 18:22:52 +0000
commita150fde95df148d11fefb344163e1b7d25d4e06e (patch)
treea499225e2c40796d9ffde2c2464c6d976dc4254f /src
parenta061ba837ed32323142f6505b7c18e46e76db422 (diff)
downloadipacct-a150fde95df148d11fefb344163e1b7d25d4e06e.tar.gz
ipacct-a150fde95df148d11fefb344163e1b7d25d4e06e.tar.bz2
(list_free): Check if *listp is not null.
Diffstat (limited to 'src')
-rw-r--r--src/list.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/list.c b/src/list.c
index a55c008..2b44b2d 100644
--- a/src/list.c
+++ b/src/list.c
@@ -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;

Return to:

Send suggestions and report system problems to the System administrator.