[grilo-plugins] metadata-store: ignore error on backwards compatibility query



commit 83b76e0d2c6172e297d8bb402650d6ce5ab76290
Author: Victor Toso <me victortoso com>
Date:   Wed Mar 1 21:42:24 2017 +0100

    metadata-store: ignore error on backwards compatibility query
    
    Failure happens due the fact that sql table already has those columns.
    This fixes the following leak.
    
    40 bytes in 1 blocks are definitely lost in loss record 10,094 of 20,529
       at 0x4C2DB9D: malloc (vg_replace_malloc.c:299)
       by 0x217107D6: sqlite3MemMalloc (sqlite3.c:20398)
       by 0x216EB967: mallocWithAlarm (sqlite3.c:24067)
       by 0x216EB967: sqlite3Malloc (sqlite3.c:24098)
       by 0x2175382B: sqlite3_exec (sqlite3.c:108798)
       by 0x2624FD1B: grl_metadata_store_source_init (grl-metadata-store.c:271)
       by 0x53C07FA: g_type_create_instance (gtype.c:1866)
       by 0x53A269A: g_object_new_internal (gobject.c:1783)
       by 0x53A45AD: g_object_new_valist (gobject.c:2042)
       by 0x53A4850: g_object_new (gobject.c:1626)
       by 0x2624F93C: grl_metadata_store_source_new (grl-metadata-store.c:194)
       by 0x2624F874: grl_metadata_store_source_plugin_init (grl-metadata-store.c:167)
       by 0x4E48615: grl_plugin_load (grl-plugin.c:243)
    
    https://bugzilla.gnome.org/show_bug.cgi?id=779444

 src/metadata-store/grl-metadata-store.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/metadata-store/grl-metadata-store.c b/src/metadata-store/grl-metadata-store.c
index 1e1f2ed..1e107a2 100644
--- a/src/metadata-store/grl-metadata-store.c
+++ b/src/metadata-store/grl-metadata-store.c
@@ -266,10 +266,10 @@ grl_metadata_store_source_init (GrlMetadataStoreSource *source)
   // For backwards compatibility, add newer columns if they don't exist
   // in the old database.
   sqlite3_exec (source->priv->db, GRL_SQL_ALTER_TABLE_ADD_FAVOURITE,
-                NULL, NULL, &sql_error);
+                NULL, NULL, NULL);
 
   sqlite3_exec (source->priv->db, GRL_SQL_ALTER_TABLE_ADD_TYPE_ID,
-                NULL, NULL, &sql_error);
+                NULL, NULL, NULL);
 
   GRL_DEBUG ("  OK");
 }


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