From 2a358252477dfc4784b0b484a997b3351cb00790 Mon Sep 17 00:00:00 2001 From: Sebastian Ramacher Date: Sun, 16 Oct 2011 23:01:25 +0200 Subject: [PATCH] fix 'path may be used unitialized' --- database-sqlite.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/database-sqlite.c b/database-sqlite.c index f6ef6cf..d613b84 100644 --- a/database-sqlite.c +++ b/database-sqlite.c @@ -17,12 +17,12 @@ zathura_database_t* zathura_db_init(const char* dir) { if (dir == NULL) { - goto error_ret; + return NULL; } char* path = g_build_filename(dir, DATABASE, NULL); if (path == NULL) { - goto error_ret; + return NULL; } zathura_database_t* db = g_malloc0(sizeof(zathura_database_t)); @@ -65,9 +65,6 @@ zathura_db_init(const char* dir) error_free: zathura_db_free(db); - -error_ret: - g_free(path); return NULL;