fix memleak by freeing the rotated files accordingly
"@(#) Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000\n\
The Regents of the University of California. All rights reserved.\n";
static const char rcsid[] _U_ =
"@(#) Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000\n\
The Regents of the University of California. All rights reserved.\n";
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.262 2005-10-20 07:43:52 hannes Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/tcpdump.c,v 1.263 2005-10-25 09:29:44 hannes Exp $ (LBL)";
if (snprintf(buffer, NAME_MAX + 1, "%s%0*d", filename, max_chars, cnt) > NAME_MAX)
/* Report an error if the filename is too large */
error("too many output files or filename is too long (> %d)", NAME_MAX);
if (snprintf(buffer, NAME_MAX + 1, "%s%0*d", filename, max_chars, cnt) > NAME_MAX)
/* Report an error if the filename is too large */
error("too many output files or filename is too long (> %d)", NAME_MAX);
}
static int tcpdump_printf(netdissect_options *ndo _U_,
}
static int tcpdump_printf(netdissect_options *ndo _U_,
MakeFilename(WFileNameAlt, WFileName, 0, 0);
p = pcap_dump_open(pd, WFileNameAlt);
MakeFilename(WFileNameAlt, WFileName, 0, 0);
p = pcap_dump_open(pd, WFileNameAlt);
if (p == NULL)
error("%s", pcap_geterr(pd));
if (Cflag != 0 || Gflag != 0) {
if (p == NULL)
error("%s", pcap_geterr(pd));
if (Cflag != 0 || Gflag != 0) {