diff options
author | Mikael Kanstrup <mikael.kanstrup@gmail.com> | 2017-06-30 15:59:56 +0200 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-06-30 22:43:11 +0000 |
commit | b3453b9be4bd4deff285a713af4aa929bb9634c4 (patch) | |
tree | 61da3fbc6b2c3d82863e339832eb6df9561398ab /extcap | |
parent | ec1a5b15455c2c0bd5535d5257b2513804140747 (diff) |
androiddump: Fix leaked linktype string
The regex matching for linktype might be performed multiple
times. Make sure string is freed before fetched again.
Change-Id: Ice7812ff4a3a8e6a1497ab2ef5aa94976502c16f
Reviewed-on: https://code.wireshark.org/review/22482
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'extcap')
-rw-r--r-- | extcap/androiddump.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/extcap/androiddump.c b/extcap/androiddump.c index 30a732600e..ab145cbf4f 100644 --- a/extcap/androiddump.c +++ b/extcap/androiddump.c @@ -2439,6 +2439,7 @@ static int capture_android_tcpdump(char *interface, char *fifo, g_regex_match(regex, data, (GRegexMatchFlags)0, &match); if (g_match_info_matches(match)) { + g_free(linktype); linktype = g_match_info_fetch_named(match, "linktype"); } g_match_info_free(match); |