From a0de9d710effadbb68e4dea3292332094a02c1c3 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 4 Dec 1999 05:37:36 +0000 Subject: [PATCH] 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 --- wiretap/file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 @@ -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)) {