From c824544862d0b105e806a282d95d33dd22266080 Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Tue, 18 Apr 2017 13:51:02 +0900 Subject: [PATCH] Fix a issue of static analysis Change-Id: I386ddff7fd06752e43191c96b6931d55157c9fd7 Signed-off-by: Sangyoon Jang --- src/pkgmgrinfo_pkginfo.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pkgmgrinfo_pkginfo.c b/src/pkgmgrinfo_pkginfo.c index ae1073c..b5cac35 100644 --- a/src/pkgmgrinfo_pkginfo.c +++ b/src/pkgmgrinfo_pkginfo.c @@ -376,7 +376,7 @@ static int _pkginfo_get_packages(uid_t uid, const char *locale, author_x *author = NULL; GList *bind_params = NULL; sqlite3 *db; - sqlite3_stmt *stmt; + sqlite3_stmt *stmt = NULL; pkgmgrinfo_filter_x *tmp_filter = NULL; bool is_check_storage = true; @@ -570,7 +570,8 @@ catch: g_list_free_full(bind_params, free); sqlite3_close_v2(db); - sqlite3_finalize(stmt); + if (stmt) + sqlite3_finalize(stmt); return ret; } -- 2.7.4