Mercurial > pidgin
diff libpurple/protocols/sametime/sametime.c @ 24857:4455637864b4
Fix a potential leak "KuSh" discovered using "cppcheck". Fixes #7862.
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Mon, 22 Dec 2008 16:15:40 +0000 |
parents | 508e57943440 |
children | f0c2e27c7ae7 7f552614ec8a 43b721aa4b76 |
line wrap: on
line diff
--- a/libpurple/protocols/sametime/sametime.c Mon Dec 22 16:13:43 2008 +0000 +++ b/libpurple/protocols/sametime/sametime.c Mon Dec 22 16:15:40 2008 +0000 @@ -3724,7 +3724,6 @@ gc->flags |= PURPLE_CONNECTION_NO_IMAGES; user = g_strdup(purple_account_get_username(account)); - pass = g_strdup(purple_account_get_password(account)); host = strrchr(user, ':'); if(host) { @@ -3741,10 +3740,12 @@ if(! host || ! *host) { /* somehow, we don't have a host to connect to. Well, we need one to actually continue, so let's ask the user directly. */ + g_free(user); prompt_host(gc); return; } + pass = g_strdup(purple_account_get_password(account)); port = purple_account_get_int(account, MW_KEY_PORT, MW_PLUGIN_DEFAULT_PORT); DEBUG_INFO("user: '%s'\n", user);