finch/gntaccount.c

changeset 42234
95aec1611d01
parent 42172
7c2d151b410d
child 42269
fa7ab9df882b
--- a/finch/gntaccount.c	Tue Jul 11 23:48:07 2023 -0500
+++ b/finch/gntaccount.c	Wed Jul 12 21:25:22 2023 -0500
@@ -141,6 +141,12 @@
 		account = purple_account_new(username->str, purple_protocol_get_id(protocol));
 		info = PURPLE_CONTACT_INFO(account);
 		purple_account_manager_add(manager, account);
+
+		/* We don't have a cleanup function for this dialog, so we can really
+		 * only unref this new instance here. The pointer will remain valid as
+		 * the account manager adds a reference.
+		 */
+		g_object_unref(G_OBJECT(account));
 	} else {
 		account = dialog->account;
 		info = PURPLE_CONTACT_INFO(account);

mercurial