[totem-pl-parser] lib: Fix small memory leak



commit ec8caf12734bb944ea0ffe7a6c1c38d2b353bfd2
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Apr 5 15:47:58 2012 +0100

    lib: Fix small memory leak

 plparse/totem-pl-parser-media.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/plparse/totem-pl-parser-media.c b/plparse/totem-pl-parser-media.c
index 2f7487d..f269846 100644
--- a/plparse/totem-pl-parser-media.c
+++ b/plparse/totem-pl-parser-media.c
@@ -238,6 +238,7 @@ totem_pl_parser_add_directory (TotemPlParser *parser,
 	gboolean unhandled;
 
 	uri = g_file_get_uri (file);
+	media_uri = NULL;
 	type = totem_cd_detect_type_from_dir (uri, &media_uri, NULL);
 	g_free (uri);
 
@@ -254,6 +255,7 @@ totem_pl_parser_add_directory (TotemPlParser *parser,
 		g_free (media_uri);
 		return TOTEM_PL_PARSER_RESULT_SUCCESS;
 	}
+	g_free (media_uri);
 
 	if (totem_pl_parser_load_directory (file, &list, &unhandled) == FALSE) {
 		if (unhandled != FALSE)



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