aboutsummaryrefslogtreecommitdiffstats
path: root/capchild/capture_ifinfo.c
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2015-10-04 11:31:19 +0200
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2015-10-04 15:45:02 +0000
commitc647faa8a90739963ba40a099a365197f90b2184 (patch)
tree779aa416faca634eb3eb5dcd84e8421a75720ce2 /capchild/capture_ifinfo.c
parent49151eb28c421b61a89bd18feb509e9428909b1e (diff)
Fix various memleaks
Found by starting Wireshark within an empty profile, opening Preferences, search for Protocol "IEEE 802.11" (because it has radio buttons), then close everything again. Many fixes are trivial, but the various recent_read_* functions in recent.c were changed to return a boolean such that the result can always be checked even if errno==0. QButtonGroup leak was hinted by Clang Static Analyzer, all other memleaks were found using ASAN/LSan. Change-Id: Ia73f5d4c09d92f22e72377be59e23342f8ad7211 Reviewed-on: https://code.wireshark.org/review/10776 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'capchild/capture_ifinfo.c')
-rw-r--r--capchild/capture_ifinfo.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/capchild/capture_ifinfo.c b/capchild/capture_ifinfo.c
index 510f529549..30cb7d1b0e 100644
--- a/capchild/capture_ifinfo.c
+++ b/capchild/capture_ifinfo.c
@@ -323,6 +323,7 @@ capture_get_if_capabilities(const gchar *ifname, gboolean monitor_mode,
data_link_info->description = g_strdup(lt_parts[2]);
else
data_link_info->description = NULL;
+ g_strfreev(lt_parts);
linktype_list = g_list_append(linktype_list, data_link_info);
}