Fix memory leak 48/266548/2
authorChanggyu Choi <changyu.choi@samsung.com>
Mon, 15 Nov 2021 08:15:30 +0000 (17:15 +0900)
committerChanggyu Choi <changyu.choi@samsung.com>
Mon, 15 Nov 2021 08:17:21 +0000 (17:17 +0900)
Change-Id: Ia44a0d5d8ce02297553c180b3ba28d43b057956d
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
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;
        }