[tracker] libtracker-extract: Plug leak



commit ec0f8af74017cd77499db550006962ac790cf650
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Mar 10 23:51:42 2014 +0100

    libtracker-extract: Plug leak
    
    Destroy the hashtable after use, and s/FALSE/NULL/ in the return
    value of the initial check.

 src/libtracker-extract/tracker-module-manager.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-extract/tracker-module-manager.c b/src/libtracker-extract/tracker-module-manager.c
index 180b142..9794d43 100644
--- a/src/libtracker-extract/tracker-module-manager.c
+++ b/src/libtracker-extract/tracker-module-manager.c
@@ -245,7 +245,7 @@ tracker_extract_module_manager_get_fallback_rdf_types (const gchar *mimetype)
 
        if (!initialized &&
            !tracker_extract_module_manager_init ()) {
-               return FALSE;
+               return NULL;
        }
 
        rdf_types = g_hash_table_new (g_str_hash, g_str_equal);
@@ -272,6 +272,8 @@ tracker_extract_module_manager_get_fallback_rdf_types (const gchar *mimetype)
                i++;
        }
 
+       g_hash_table_unref (rdf_types);
+
        return types;
 }
 


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