diff options
-rw-r--r-- | src/core/special-vars.c | 4 | ||||
-rw-r--r-- | src/irc/core/server-setup.c | 7 |
2 files changed, 2 insertions, 9 deletions
diff --git a/src/core/special-vars.c b/src/core/special-vars.c index 7d51bca1..91f8897e 100644 --- a/src/core/special-vars.c +++ b/src/core/special-vars.c @@ -119,10 +119,8 @@ static char *get_long_variable_value(const char *key, void *server, void *item, /* environment variable? */ ret = g_getenv(key); - if (ret != NULL) { - *free_ret = TRUE; + if (ret != NULL) return ret; - } return NULL; } diff --git a/src/irc/core/server-setup.c b/src/irc/core/server-setup.c index 1a8e9d7b..191d4b34 100644 --- a/src/irc/core/server-setup.c +++ b/src/irc/core/server-setup.c @@ -205,7 +205,6 @@ static void init_userinfo(void) str = g_getenv("IRCNAME"); iconfig_set_str("settings", "real_name", str != NULL ? str : g_get_real_name()); - g_free_not_null(str); } /* username */ @@ -214,7 +213,6 @@ static void init_userinfo(void) str = g_getenv("IRCUSER"); iconfig_set_str("settings", "user_name", str != NULL ? str : g_get_user_name()); - g_free_not_null(str); user_name = settings_get_str("user_name"); } @@ -225,7 +223,6 @@ static void init_userinfo(void) str = g_getenv("IRCNICK"); iconfig_set_str("settings", "default_nick", str != NULL ? str : user_name); - g_free_not_null(str); default_nick = settings_get_str("default_nick"); } @@ -247,10 +244,8 @@ static void init_userinfo(void) set = settings_get_str("hostname"); if (set == NULL || *set == '\0') { str = g_getenv("IRCHOST"); - if (str != NULL) { + if (str != NULL) iconfig_set_str("settings", "hostname", str); - g_free(str); - } } } |