From 491974d193909b329949c845602382507fd9c1c7 Mon Sep 17 00:00:00 2001 From: guy Date: Sun, 15 Aug 1999 22:16:59 +0000 Subject: [PATCH] "open_cap_file()", if it succeeds, closes any capture file we had open; that means it destroys any read filter we had, so we don't need to destroy it in "capture()" after "open_cap_file()" succeeds. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@498 f5534014-38df-0310-8fa8-9805f1628bb7 --- capture.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/capture.c b/capture.c index 3b05777800..024315af9c 100644 --- a/capture.c +++ b/capture.c @@ -1,7 +1,7 @@ /* capture.c * Routines for packet capture windows * - * $Id: capture.c,v 1.50 1999/08/15 19:18:46 guy Exp $ + * $Id: capture.c,v 1.51 1999/08/15 22:16:59 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs @@ -425,7 +425,7 @@ capture(void) { bpf_u_int32 netnum, netmask; time_t upd_time, cur_time; int err, inpkts; - + ld.go = TRUE; ld.counts.total = 0; ld.max = cf.count; @@ -626,9 +626,7 @@ capture(void) { /* "pch" is non-NULL only if we successfully started a capture. If we haven't, there's no capture file to load. */ if ((err = open_cap_file(cf.save_file, &cf)) == 0) { - /* Destroy any existing read filter, and set it to NULL. */ - if (cf.rfcode != NULL) - dfilter_destroy(cf.rfcode); + /* Set the read filter to NULL. */ cf.rfcode = NULL; if ((err = read_cap_file(&cf)) == 0) { set_menu_sensitivity("/File/Save", TRUE); -- 2.34.1