From 2440a5b0b6aa9fad1899c417c0363c30bfd8040c Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 25 May 2000 13:54:43 +0000 Subject: Unline glib.h tells, g_getenv() doesn't return newly allocated string after all.. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@239 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/irc/core/server-setup.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/irc') 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); - } } } -- cgit v1.2.3