[grilo-plugins] metadata-store: Variable is used after freeing it
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] metadata-store: Variable is used after freeing it
- Date: Mon, 19 Nov 2012 14:07:09 +0000 (UTC)
commit 385413756adaf884e8c7a26c2624df9262ecb52c
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date: Mon Nov 19 14:06:40 2012 +0000
metadata-store: Variable is used after freeing it
src/metadata-store/grl-metadata-store.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/metadata-store/grl-metadata-store.c b/src/metadata-store/grl-metadata-store.c
index 02a8ace..c634b76 100644
--- a/src/metadata-store/grl-metadata-store.c
+++ b/src/metadata-store/grl-metadata-store.c
@@ -201,14 +201,16 @@ grl_metadata_store_source_init (GrlMetadataStoreSource *source)
db_path = g_strconcat (path, G_DIR_SEPARATOR_S, GRL_SQL_DB, NULL);
r = sqlite3_open (db_path, &source->priv->db);
g_free (path);
- g_free (db_path);
if (r) {
g_critical ("Failed to open database '%s': %s",
db_path, sqlite3_errmsg (source->priv->db));
sqlite3_close (source->priv->db);
+ g_free (db_path);
return;
}
+ g_free (db_path);
+
GRL_DEBUG (" OK");
GRL_DEBUG ("Checking database tables...");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]