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>
This commit is contained in:
Peter Wu 2018-04-24 23:02:04 +02:00 committed by Anders Broman
parent 8c959fcc35
commit ab7bbaa93a
1 changed files with 4 additions and 4 deletions

View File

@ -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