aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/file.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>1999-12-04 05:37:36 +0000
committerGuy Harris <guy@alum.mit.edu>1999-12-04 05:37:36 +0000
commita0de9d710effadbb68e4dea3292332094a02c1c3 (patch)
tree523374af4b8b2813e9ffd3ff72abee326ff4fa41 /wiretap/file.c
parent94746f05daa7d99aff9d9dc1025394da7225b6a7 (diff)
Null out the "pointer to private data" member of a "wtap_dumper"
structure before calling the "dump_open" routine for the file type; it either has to be null or point to something that can be freed, as the dump close routine frees what it points to if it's not null. svn path=/trunk/; revision=1196
Diffstat (limited to 'wiretap/file.c')
-rw-r--r--wiretap/file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/wiretap/file.c b/wiretap/file.c
index d82a205b63..47158af9ad 100644
--- a/wiretap/file.c
+++ b/wiretap/file.c
@@ -1,6 +1,6 @@
/* file.c
*
- * $Id: file.c,v 1.31 1999/12/04 05:14:38 guy Exp $
+ * $Id: file.c,v 1.32 1999/12/04 05:37:36 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@verdict.uthscsa.edu>
@@ -236,6 +236,7 @@ static wtap_dumper* wtap_dump_open_common(FILE *fh, int filetype, int encap,
wdh->snaplen = snaplen;
wdh->encap = encap;
+ wdh->private.opaque = NULL;
for (dtp = &dump_open_table[0]; dtp->dump_open != NULL; dtp++) {
if (filetype == dtp->type) {
if (!(*dtp->dump_open)(wdh, err)) {