let account_new() take ownership of passed values

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
This commit is contained in:
Steffen Jaeckel
2022-12-27 22:52:12 +01:00
parent a0aa26b6fa
commit 302d0dd576
8 changed files with 72 additions and 144 deletions

View File

@@ -194,8 +194,8 @@ void
cmd_otr_gen_generates_key_for_connected_account(void** state)
{
gchar* args[] = { "gen", NULL };
char* account_name = "myaccount";
ProfAccount* account = account_new(account_name, "me@jabber.org", NULL, NULL,
char* account_name = g_strdup("myaccount");
ProfAccount* account = account_new(account_name, g_strdup("me@jabber.org"), NULL, NULL,
TRUE, NULL, 0, NULL, NULL, NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
will_return(connection_get_status, JABBER_CONNECTED);