aboutsummaryrefslogtreecommitdiffstats
path: root/epan/filesystem.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2009-03-13 22:06:48 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2009-03-13 22:06:48 +0000
commit62f60df6b4966d4e3d7f478284768115ef150b20 (patch)
tree259b574936077d87b88ed6d0429ba317078e0fcc /epan/filesystem.c
parent7ed615f165fcb0cc87c2aba1921fb87a8a384ca5 (diff)
From Jakub Zawadzki (bug 3331):
g_free() is NULL safe, so we don't need check against it. svn path=/trunk/; revision=27718
Diffstat (limited to 'epan/filesystem.c')
-rw-r--r--epan/filesystem.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/epan/filesystem.c b/epan/filesystem.c
index cf1a347720..5b522d6b76 100644
--- a/epan/filesystem.c
+++ b/epan/filesystem.c
@@ -812,9 +812,7 @@ char *getenv_utf8(const char *varname)
void
set_profile_name(const gchar *profilename)
{
- if (persconfprofile) {
- g_free (persconfprofile);
- }
+ g_free (persconfprofile);
if (profilename && strlen(profilename) > 0 &&
strcmp(profilename, DEFAULT_PROFILE) != 0) {
@@ -934,10 +932,7 @@ get_profiles_dir(void)
{
static char *profiles_dir = NULL;
- if (profiles_dir) {
- g_free (profiles_dir);
- }
-
+ g_free (profiles_dir);
profiles_dir = g_strdup_printf ("%s%s%s", get_persconffile_dir_no_profile (),
G_DIR_SEPARATOR_S, PROFILES_DIR);
@@ -949,9 +944,7 @@ get_persconffile_dir(const gchar *profilename)
{
static char *persconffile_profile_dir = NULL;
- if (persconffile_profile_dir) {
- g_free (persconffile_profile_dir);
- }
+ g_free (persconffile_profile_dir);
if (profilename && strlen(profilename) > 0 &&
strcmp(profilename, DEFAULT_PROFILE) != 0) {