changeset 22875:f1475ca224a8

Plug a leak.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Tue, 19 Feb 2008 19:46:49 +0000
parents 02eda4bd2b22
children bb1dc0095856
files libpurple/util.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/util.c	Tue Feb 19 19:41:56 2008 +0000
+++ b/libpurple/util.c	Tue Feb 19 19:46:49 2008 +0000
@@ -2915,9 +2915,11 @@
 purple_util_get_image_filename(gconstpointer image_data, size_t image_len)
 {
 	/* Return the filename */
-	return g_strdup_printf("%s.%s", 
-	                       purple_util_get_image_checksum(image_data, image_len),
+	char *checksum = purple_util_get_image_checksum(image_data, image_len);
+	char *filename = g_strdup_printf("%s.%s", checksum,
 	                       purple_util_get_image_extension(image_data, image_len));
+	g_free(checksum);
+	return filename;
 }
 
 gboolean