diff options
author | Peter Wu <peter@lekensteyn.nl> | 2016-09-10 01:12:58 +0200 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2016-09-10 12:59:47 +0000 |
commit | ba2a3b3626ef9fc084ee8a9508d196ec890c2336 (patch) | |
tree | 7351cf899d7502a14d90bca53a70799ca5e6f309 /wiretap/wtap.h | |
parent | d6f91a7ca421caa7787c1539bca61f943923fa9c (diff) | |
download | wireshark-ba2a3b3626ef9fc084ee8a9508d196ec890c2336.tar.gz |
wiretap: fix memory leak of interface_data for wtap_dumper
Mirrors the behavior of wtap_close.
Change-Id: I1a04878fdd0409fa74931737332f9b8a1ae77fb1
Reviewed-on: https://code.wireshark.org/review/17620
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'wiretap/wtap.h')
-rw-r--r-- | wiretap/wtap.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/wiretap/wtap.h b/wiretap/wtap.h index 7a8b1d94c2..63787292ba 100644 --- a/wiretap/wtap.h +++ b/wiretap/wtap.h @@ -1713,9 +1713,11 @@ void wtap_fdclose(wtap *wth); WS_DLL_PUBLIC gboolean wtap_fdreopen(wtap *wth, const char *filename, int *err); -/*** close the current file ***/ +/** Close only the sequential side, freeing up memory it uses. */ WS_DLL_PUBLIC void wtap_sequential_close(wtap *wth); + +/** Closes any open file handles and frees the memory associated with wth. */ WS_DLL_PUBLIC void wtap_close(wtap *wth); @@ -1874,8 +1876,13 @@ void wtap_set_bytes_dumped(wtap_dumper *wdh, gint64 bytes_dumped); struct addrinfo; WS_DLL_PUBLIC gboolean wtap_dump_set_addrinfo_list(wtap_dumper *wdh, addrinfo_lists_t *addrinfo_lists); + +/** + * Closes open file handles and frees memory associated with wdh. Note that + * shb_hdr, idb_inf and nrb_hdr are not freed by this routine. + */ WS_DLL_PUBLIC -gboolean wtap_dump_close(wtap_dumper *, int *); +gboolean wtap_dump_close(wtap_dumper *wdh, int *err); /** * Return TRUE if we can write a file out with the given GArray of file |