From b3453b9be4bd4deff285a713af4aa929bb9634c4 Mon Sep 17 00:00:00 2001 From: Mikael Kanstrup Date: Fri, 30 Jun 2017 15:59:56 +0200 Subject: 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 Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- extcap/androiddump.c | 1 + 1 file changed, 1 insertion(+) 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); -- cgit v1.2.1