Fix svace issue 67/268867/1 accepted/tizen_7.0_unified accepted/tizen_7.0_unified_hotfix accepted/tizen_8.0_unified accepted/tizen_9.0_unified accepted/tizen_unified accepted/tizen_unified_riscv tizen tizen_7.0 tizen_7.0_hotfix tizen_8.0 tizen_9.0 accepted/tizen/7.0/unified/20221110.063523 accepted/tizen/7.0/unified/hotfix/20221116.105848 accepted/tizen/8.0/unified/20231005.093925 accepted/tizen/9.0/unified/20241031.000046 accepted/tizen/unified/20220104.123153 accepted/tizen/unified/riscv/20230724.093749 submit/tizen/20220104.053818 tizen_7.0_m2_release tizen_8.0_m2_release tizen_9.0_m2_release
authorWootak Jung <wootak.jung@samsung.com>
Tue, 4 Jan 2022 04:46:52 +0000 (13:46 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Tue, 4 Jan 2022 04:51:07 +0000 (13:51 +0900)
Change-Id: I1ee7ee53c2a5bae7e4bd795f8d82e1abbd94c7ab
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
src/database_main.c

index 5af22a0..0b21d2e 100644 (file)
@@ -127,6 +127,7 @@ static void *create_handle(Storage *strg, const char *path)
        rv = sqlite3_busy_handler(handle, _busy_handler, NULL);
        if (rv != SQLITE_OK) {
                err("fail to register busy handler err(%d), errmsg(%s)", rv, sqlite3_errmsg(handle));
+               sqlite3_close(handle);
                return NULL;
        }