diff options
author | Peter Wu <peter@lekensteyn.nl> | 2017-01-07 00:14:23 +0100 |
---|---|---|
committer | Dario Lombardo <lomato@gmail.com> | 2017-01-07 20:32:43 +0000 |
commit | 2009dcc98dc46712c8b64ae30408c4d53c64980b (patch) | |
tree | cd0deaf25fddb93c924dad3246e2ee7ccaaa9ec9 /extcap/sshdump.c | |
parent | 03a8884989035400316b03913b68787c50308082 (diff) | |
download | wireshark-2009dcc98dc46712c8b64ae30408c4d53c64980b.tar.gz |
extcap: fix memleak via data_file_url
Commit v2.1.0rc0-2181-ga4e2263ac4 introduced a helppage parameter, but
all callers were NULL. In a later change, callers would use the
data_file_url() function, but this needs to be freed, so do that.
Fixes: v2.3.0rc0-1825-ge5596b74bd ("extcap: set help page for all extcaps.")
Change-Id: I967c0f8c6b50d9e78ac227575de24a81f97d376a
Reviewed-on: https://code.wireshark.org/review/19570
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Diffstat (limited to 'extcap/sshdump.c')
-rw-r--r-- | extcap/sshdump.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/extcap/sshdump.c b/extcap/sshdump.c index 9b71c6b613..030403282d 100644 --- a/extcap/sshdump.c +++ b/extcap/sshdump.c @@ -338,6 +338,7 @@ int main(int argc, char **argv) guint32 count = 0; int ret = EXIT_FAILURE; extcap_parameters * extcap_conf = g_new0(extcap_parameters, 1); + char* help_url; char* help_header = NULL; #ifdef _WIN32 @@ -346,8 +347,10 @@ int main(int argc, char **argv) attach_parent_console(); #endif /* _WIN32 */ + help_url = data_file_url("sshdump.html"); extcap_base_set_util_info(extcap_conf, argv[0], SSHDUMP_VERSION_MAJOR, SSHDUMP_VERSION_MINOR, - SSHDUMP_VERSION_RELEASE, data_file_url("sshdump.html")); + SSHDUMP_VERSION_RELEASE, help_url); + g_free(help_url); extcap_base_register_interface(extcap_conf, SSH_EXTCAP_INTERFACE, "SSH remote capture", 147, "Remote capture dependent DLT"); help_header = g_strdup_printf( |