diff options
author | Guy Harris <guy@alum.mit.edu> | 2017-04-29 04:28:53 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2017-04-29 11:29:34 +0000 |
commit | 2a3f1a4f6724c061f47a0266e157e6d84aa65c7d (patch) | |
tree | bdb778c127d6cb73751c7bfc2766a6ba1cecac0d /wiretap | |
parent | e3f49280deb11a7055083634fbbc4d8416fce024 (diff) |
Eliminate some double-frees.
The cfile_ error-reporting routines free err_info; the caller doesn't
have to and, in fact, mustn't do so themselves.
While we're at it, make sure wtap_seek_read() always zeroes out *err and
nulls out *err_info, so the latter either points to a freshly-allocated
string or is null.
Change-Id: Idfe05a3ba2fbf2647ba14e483187617ee53e3c69
Reviewed-on: https://code.wireshark.org/review/21407
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap')
-rw-r--r-- | wiretap/wtap.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/wiretap/wtap.c b/wiretap/wtap.c index 1b9ab0552a..58a22e9298 100644 --- a/wiretap/wtap.c +++ b/wiretap/wtap.c @@ -1403,6 +1403,8 @@ wtap_seek_read(wtap *wth, gint64 seek_off, phdr->pkt_encap = wth->file_encap; phdr->pkt_tsprec = wth->file_tsprec; + *err = 0; + *err_info = NULL; if (!wth->subtype_seek_read(wth, seek_off, phdr, buf, err, err_info)) return FALSE; |