--- psiconv/trunk/lib/psiconv/list.c 2001/01/29 21:57:05 98 +++ psiconv/trunk/lib/psiconv/list.c 2005/11/15 15:52:34 270 @@ -1,6 +1,6 @@ /* list.c - Part of psiconv, a PSION 5 file formats converter - Copyright (c) 1999, 2000 Frodo Looijaard + Copyright (c) 1999-2005 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,11 +22,17 @@ #include "compat.h" #include #include +#include #include #include "general.h" #include "list.h" #include "error.h" +#ifdef DMALLOC +#include +#endif + + static int psiconv_list_resize(psiconv_list l,psiconv_u32 nr); struct psiconv_list_s { @@ -53,9 +59,8 @@ { if (l->max_len) free(l->els); - l->max_len = 0; - l->cur_len = 0; - l->els = NULL; + free(l); + l = NULL; } void psiconv_list_free_el(psiconv_list l, void free_el(void *el))