mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Free options in error case for cmd_connect()
Regards https://github.com/profanity-im/profanity/issues/1019
This commit is contained in:
parent
81b537b36d
commit
10f2715ea9
@ -348,6 +348,7 @@ cmd_connect(ProfWin *window, const char *const command, gchar **args)
|
|||||||
if (!parsed) {
|
if (!parsed) {
|
||||||
cons_bad_cmd_usage(command);
|
cons_bad_cmd_usage(command);
|
||||||
cons_show("");
|
cons_show("");
|
||||||
|
options_destroy(options);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -362,6 +363,7 @@ cmd_connect(ProfWin *window, const char *const command, gchar **args)
|
|||||||
(g_strcmp0(tls_policy, "legacy") != 0)) {
|
(g_strcmp0(tls_policy, "legacy") != 0)) {
|
||||||
cons_bad_cmd_usage(command);
|
cons_bad_cmd_usage(command);
|
||||||
cons_show("");
|
cons_show("");
|
||||||
|
options_destroy(options);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -375,6 +377,7 @@ cmd_connect(ProfWin *window, const char *const command, gchar **args)
|
|||||||
cons_show("");
|
cons_show("");
|
||||||
free(err_msg);
|
free(err_msg);
|
||||||
port = 0;
|
port = 0;
|
||||||
|
options_destroy(options);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -388,6 +391,7 @@ cmd_connect(ProfWin *window, const char *const command, gchar **args)
|
|||||||
} else {
|
} else {
|
||||||
cons_show("No default account.");
|
cons_show("No default account.");
|
||||||
g_free(def);
|
g_free(def);
|
||||||
|
options_destroy(options);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -422,6 +426,7 @@ cmd_connect(ProfWin *window, const char *const command, gchar **args)
|
|||||||
cons_show("Error evaluating password, see logs for details.");
|
cons_show("Error evaluating password, see logs for details.");
|
||||||
account_free(account);
|
account_free(account);
|
||||||
free(user);
|
free(user);
|
||||||
|
options_destroy(options);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user