diff options
author | Guy Harris <guy@alum.mit.edu> | 1999-12-04 05:37:36 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 1999-12-04 05:37:36 +0000 |
commit | a0de9d710effadbb68e4dea3292332094a02c1c3 (patch) | |
tree | 523374af4b8b2813e9ffd3ff72abee326ff4fa41 /wiretap/file.c | |
parent | 94746f05daa7d99aff9d9dc1025394da7225b6a7 (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.c | 3 |
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)) { |