# HG changeset patch # User Daniel Atallah # Date 1229962540 0 # Node ID 4455637864b464d205e6b36a772b4a388583daaa # Parent 75690a3eeee00eafaf4789b3fd8a9c19507a81a4 Fix a potential leak "KuSh" discovered using "cppcheck". Fixes #7862. diff -r 75690a3eeee0 -r 4455637864b4 libpurple/protocols/sametime/sametime.c --- 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);