aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/addr_resolv.c14
-rw-r--r--wsutil/filesystem.c12
2 files changed, 25 insertions, 1 deletions
diff --git a/epan/addr_resolv.c b/epan/addr_resolv.c
index f8a5ca0176..73b2452a64 100644
--- a/epan/addr_resolv.c
+++ b/epan/addr_resolv.c
@@ -665,6 +665,8 @@ service_name_lookup_cleanup(void)
serv_port_hashtable = NULL;
g_free(g_services_path);
g_services_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
@@ -1332,6 +1334,13 @@ initialize_ethers(void)
} /* initialize_ethers */
+static void
+ethers_cleanup(void)
+{
+ g_free(g_pethers_path);
+ g_pethers_path = NULL;
+}
+
/* Resolve ethernet address */
static hashether_t *
eth_addr_resolve(hashether_t *tp) {
@@ -1708,6 +1717,8 @@ static void
ipx_name_lookup_cleanup(void)
{
ipxnet_hash_table = NULL;
+ g_free(g_pipxnets_path);
+ g_pipxnets_path = NULL;
}
#if 0
@@ -1919,6 +1930,8 @@ static void
vlan_name_lookup_cleanup(void)
{
vlan_hash_table = NULL;
+ g_free(g_pvlan_path);
+ g_pvlan_path = NULL;
}
static const gchar *
@@ -3374,6 +3387,7 @@ addr_resolv_cleanup(void)
{
vlan_name_lookup_cleanup();
service_name_lookup_cleanup();
+ ethers_cleanup();
ipx_name_lookup_cleanup();
/* host name initialization is done on a per-capture-file basis */
/*host_name_lookup_cleanup();*/
diff --git a/wsutil/filesystem.c b/wsutil/filesystem.c
index f820ef1df0..0b80b98aaf 100644
--- a/wsutil/filesystem.c
+++ b/wsutil/filesystem.c
@@ -1396,7 +1396,7 @@ get_global_profiles_dir(void)
return global_profiles_dir;
}
-static const char *
+static char *
get_persconffile_dir(const gchar *profilename)
{
static char *persconffile_profile_dir = NULL;
@@ -1821,6 +1821,7 @@ char *
get_persconffile_path(const char *filename, gboolean from_profile)
{
char *path;
+
if (do_store_persconffiles && from_profile && !g_hash_table_lookup (profile_files, filename)) {
/* Store filenames so we know which filenames belongs to a configuration profile */
g_hash_table_insert (profile_files, g_strdup(filename), g_strdup(filename));
@@ -2194,10 +2195,19 @@ data_file_url(const gchar *filename)
void
free_progdirs(void)
{
+ g_free(persconffile_dir);
+ persconffile_dir = NULL;
+ g_free(persdatafile_dir);
+ persdatafile_dir = NULL;
+ g_free(persconfprofile);
+ persconfprofile = NULL;
g_free(progfile_dir);
+ progfile_dir = NULL;
g_free(plugin_dir);
+ plugin_dir = NULL;
#ifdef HAVE_EXTCAP
g_free(extcap_dir);
+ extcap_dir = NULL;
#endif
}