summaryrefslogtreecommitdiff
path: root/libappstream-glib/as-image.c
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2014-07-08 19:39:45 +0100
committerRichard Hughes <richard@hughsie.com>2014-07-08 19:39:45 +0100
commitbbac102e96ba618365f0ed5250a360ccaf3e2ab3 (patch)
tree83f7b464e4501149d4d9cb646ae5317027f0ca25 /libappstream-glib/as-image.c
parenta54c4a0ea60a1cb3f3517cfd18d6962416c745cd (diff)
downloadappstream-glib-bbac102e96ba618365f0ed5250a360ccaf3e2ab3.tar.gz
trivial: Fix a tiny memory leak when calling as_image_load_filename() more than once
Diffstat (limited to 'libappstream-glib/as-image.c')
-rw-r--r--libappstream-glib/as-image.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libappstream-glib/as-image.c b/libappstream-glib/as-image.c
index 98ee429..2be0f24 100644
--- a/libappstream-glib/as-image.c
+++ b/libappstream-glib/as-image.c
@@ -471,6 +471,7 @@ as_image_load_filename (AsImage *image,
* rather than the unpredicatable (for JPEG) pixel data */
if (!g_file_get_contents (filename, &data, &len, error))
return FALSE;
+ g_free (priv->md5);
priv->md5 = g_compute_checksum_for_data (G_CHECKSUM_MD5,
(guchar * )data, len);