[tracker/tracker-0.10] tracker-extract: Fix memory leak on stream



commit dc8ebc0440c65831454c5459131498e25e7987fe
Author: Philip Van Hoof <philip codeminded be>
Date:   Mon Aug 22 13:45:14 2011 +0200

    tracker-extract: Fix memory leak on stream

 src/tracker-extract/tracker-albumart.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/tracker-extract/tracker-albumart.c b/src/tracker-extract/tracker-albumart.c
index 34ba65b..3efc31d 100644
--- a/src/tracker-extract/tracker-albumart.c
+++ b/src/tracker-extract/tracker-albumart.c
@@ -147,13 +147,16 @@ file_get_checksum_if_exists (GChecksumType   checksum_type,
 			*md5 = g_strdup (g_checksum_get_string (checksum));
 		}
 
-		g_object_unref (stream);
 	} else {
 		/* File doesn't exist or isn't readable */
 		retval = FALSE;
 	}
 
 end:
+
+	if (stream) {
+		g_object_unref (stream);
+	}
 	g_checksum_free (checksum);
 	g_object_unref (file);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]