changeset 17480:a7a8e4245b33

Remove needless string duplication.
author Richard Laager <rlaager@wiktel.com>
date Mon, 04 Jun 2007 05:52:11 +0000
parents 0f4a562b38d1
children 6608a7ab0fd9
files libpurple/util.c
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/util.c	Mon Jun 04 04:50:02 2007 +0000
+++ b/libpurple/util.c	Mon Jun 04 05:52:11 2007 +0000
@@ -1594,11 +1594,13 @@
 	}
 	g_list_free(tags);
 	if(xhtml_out)
-		*xhtml_out = g_strdup(xhtml->str);
+		*xhtml_out = g_string_free(xhtml, FALSE);
+	else
+		g_string_free(xhtml, TRUE);
 	if(plain_out)
-		*plain_out = g_strdup(plain->str);
-	g_string_free(xhtml, TRUE);
-	g_string_free(plain, TRUE);
+		*plain_out = g_string_free(plain, FALSE);
+	else
+		g_string_free(plain, TRUE);
 }
 
 /* The following are probably reasonable changes: