Plug some more small leaks.

svn path=/trunk/; revision=13889
This commit is contained in:
Guy Harris 2005-03-24 03:10:31 +00:00
parent e4177b39e9
commit af2aab9ee1
3 changed files with 8 additions and 3 deletions

View File

@ -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);
}
}

View File

@ -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? */

View File

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