diff options
author | James Booth <boothj5@gmail.com> | 2016-07-25 22:38:23 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2016-07-25 22:38:23 +0100 |
commit | 8633cd6e29a74c86f13b7471f7d857f9ac9efe50 (patch) | |
tree | 832b78ad65141b5d4c4971ec2201f07e23f74a11 /src/command | |
parent | d5d04756ce278852cb465541f3b5bb4cf84f66ca (diff) | |
download | profani-tty-8633cd6e29a74c86f13b7471f7d857f9ac9efe50.tar.gz |
Free ProfAccount
Diffstat (limited to 'src/command')
-rw-r--r-- | src/command/cmd_funcs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index 26b22c4f..342d38d5 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -589,9 +589,11 @@ cmd_account_default(ProfWin *window, const char *const command, gchar **args) } } else if (g_strv_length(args) == 3) { if (strcmp(args[1], "set") == 0) { - if (accounts_get_account(args[2])) { + ProfAccount *account_p = accounts_get_account(args[2]); + if (account_p) { prefs_set_string(PREF_DEFAULT_ACCOUNT, args[2]); cons_show("Default account set to %s.", args[2]); + account_free(account_p); } else { cons_show("Account %s does not exist.", args[2]); } |