From f9acb5fdb77ff753e3b333393de94dc8680113f4 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Thu, 6 Apr 2000 06:04:24 +0000 Subject: [PATCH] After destroying the mem chunk for the packet list, null out the pointer pointing to it, so that if we call "close_cap_file()" again, we don't try to destroy an already-destroyed mem chunk. svn path=/trunk/; revision=1806 --- file.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/file.c b/file.c index 6ebd815cc3..66c2d604fd 100644 --- a/file.c +++ b/file.c @@ -1,7 +1,7 @@ /* file.c * File I/O routines * - * $Id: file.c,v 1.178 2000/04/04 05:14:48 guy Exp $ + * $Id: file.c,v 1.179 2000/04/06 06:04:24 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -209,8 +209,10 @@ close_cap_file(capture_file *cf, void *w) /* ...which means we have nothing to save. */ cf->user_saved = FALSE; - if (cf->plist_chunk != NULL) + if (cf->plist_chunk != NULL) { g_mem_chunk_destroy(cf->plist_chunk); + cf->plist_chunk = NULL; + } if (cf->rfcode != NULL) { dfilter_destroy(cf->rfcode); cf->rfcode = NULL;