Fix memory leak
[platform/core/appfw/librua.git] / src / rua_util.c
index ee83521..82baede 100644 (file)
@@ -84,6 +84,7 @@ int _rua_util_open_db(sqlite3 **db, int flags, uid_t uid, char *db_name)
        r = sqlite3_busy_handler(*db, __db_busy_handler, NULL);
        if (r != SQLITE_OK) {
                LOGE("register busy handler failed: %s", sqlite3_errmsg(*db));
+               sqlite3_close_v2(*db);
                return -1;
        }