Fix svace issue
[platform/core/telephony/tel-plugin-database.git] / 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;
        }