libpurple/protocols/gg/gg.c

branch
release-2.x.y
changeset 40920
a0e7e3b8e834
parent 40755
fb2056ce3c58
child 42954
a98ee2d89a0a
--- a/libpurple/protocols/gg/gg.c	Wed Jun 02 03:00:13 2021 -0500
+++ b/libpurple/protocols/gg/gg.c	Wed Jun 02 03:00:49 2021 -0500
@@ -1729,12 +1729,13 @@
 	glp->server_addr = server;
 
 	info->session = gg_login(glp);
+	g_free(glp);
+
 	purple_connection_update_progress(gc, _("Connecting"), 0, 2);
 	if (info->session == NULL) {
 		purple_connection_error_reason (gc,
 			PURPLE_CONNECTION_ERROR_NETWORK_ERROR,
 			_("Connection failed"));
-		g_free(glp);
 		return;
 	}
 	gc->inpa = purple_input_add(info->session->fd,
@@ -1922,7 +1923,8 @@
 
 		/* Add text after the images */
 		if(last && *last) {
-			pos = pos + g_utf8_strlen(last, -1);
+			/* this is currently not used, but might be useful later? */
+			/* pos = pos + g_utf8_strlen(last, -1); */
 			g_string_append(string_buffer, last);
 		}
 

mercurial