aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2005-03-24 03:10:31 +0000
committerGuy Harris <guy@alum.mit.edu>2005-03-24 03:10:31 +0000
commitaf2aab9ee1b8bd62bdce31b1df64b3fec55906a4 (patch)
treeaae0daeba24812b94b41e3b6ab44c27b75451239
parente4177b39e98adfc6c6944812fe59334cea57f9d1 (diff)
Plug some more small leaks.
svn path=/trunk/; revision=13889
-rw-r--r--disabled_protos.c6
-rw-r--r--epan/addr_resolv.c1
-rw-r--r--epan/prefs.c4
3 files changed, 8 insertions, 3 deletions
diff --git a/disabled_protos.c b/disabled_protos.c
index 4ccbe45e24..ebda7a273b 100644
--- a/disabled_protos.c
+++ b/disabled_protos.c
@@ -102,7 +102,8 @@ read_disabled_protos_list(char **gpath_return, int *gopen_errno_return,
*gopen_errno_return = errno;
*gread_errno_return = 0;
*gpath_return = gff_path;
- }
+ } else
+ g_free(gff_path);
}
/* Construct the pathname of the user's disabled protocols file. */
@@ -130,7 +131,8 @@ read_disabled_protos_list(char **gpath_return, int *gopen_errno_return,
*open_errno_return = errno;
*read_errno_return = 0;
*path_return = ff_path;
- }
+ } else
+ g_free(ff_path);
}
}
diff --git a/epan/addr_resolv.c b/epan/addr_resolv.c
index 9cb4e9d792..81e8777652 100644
--- a/epan/addr_resolv.c
+++ b/epan/addr_resolv.c
@@ -1649,6 +1649,7 @@ host_name_lookup_init(void) {
if (!read_hosts_file(hostspath) && errno != ENOENT) {
report_open_failure(hostspath, errno, FALSE);
}
+ g_free(hostspath);
#ifdef HAVE_GNU_ADNS
/* XXX - Any flags we should be using? */
diff --git a/epan/prefs.c b/epan/prefs.c
index 2b492734c8..9d083522f1 100644
--- a/epan/prefs.c
+++ b/epan/prefs.c
@@ -1079,6 +1079,7 @@ read_prefs(int *gpf_errno_return, int *gpf_read_errno_return,
/*
* It doesn't exist by the new name; try the old name.
*/
+ g_free(gpf_path);
gpf_path = get_datafile_path(OLD_GPF_NAME);
pf = fopen(gpf_path, "r");
}
@@ -1156,7 +1157,8 @@ read_prefs(int *gpf_errno_return, int *gpf_read_errno_return,
*pf_errno_return = errno;
*pf_read_errno_return = 0;
*pf_path_return = pf_path;
- }
+ } else
+ g_free(pf_path);
}
return &prefs;