static gboolean remove_handle(Storage *strg, void *handle)
{
+ int rv = 0;
+
if (!handle)
return FALSE;
- db_util_close(handle);
+ rv = db_util_close(handle);
+ if (rv != SQLITE_OK) {
+ err("fail to close database err(%d)", rv);
+ handle = NULL;
+ return FALSE;
+ }
dbg("disconnected from database");
return TRUE;