aboutsummaryrefslogtreecommitdiffstats
path: root/epan/addr_resolv.c
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2018-04-24 23:02:04 +0200
committerAnders Broman <a.broman58@gmail.com>2018-04-25 04:09:48 +0000
commitab7bbaa93aa98d273e9feb60babc03f89f03cc15 (patch)
tree2fbe28dda5f6b96458f7a896625357fae6c2d83e /epan/addr_resolv.c
parent8c959fcc355d0895712bfa41654121ac7db37fbf (diff)
addr_resolv: fix memleak of g_penterprises_path
Found by valgrind. Remove unnecessary "if" guard for g_free while at it. Change-Id: I58a18472f2c82e4c6c810d3cb3eeb2358b64f4ab Reviewed-on: https://code.wireshark.org/review/27133 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/addr_resolv.c')
-rw-r--r--epan/addr_resolv.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/addr_resolv.c b/epan/addr_resolv.c
index 56da73bf69..efd8fe9e4b 100644
--- a/epan/addr_resolv.c
+++ b/epan/addr_resolv.c
@@ -754,10 +754,10 @@ enterprises_cleanup(void)
g_assert(g_enterprises_path);
g_free(g_enterprises_path);
g_enterprises_path = NULL;
- if (g_pservices_path) {
- g_free(g_pservices_path);
- g_pservices_path = NULL;
- }
+ g_free(g_penterprises_path);
+ g_penterprises_path = NULL;
+ g_free(g_pservices_path);
+ g_pservices_path = NULL;
}
/* Fill in an IP4 structure with info from subnets file or just with the