summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 473e9e8)
raw | patch | inline | side by side (parent: 473e9e8)
author | Sebastian Harl <sh@tokkee.org> | |
Sun, 5 Oct 2014 16:10:09 +0000 (18:10 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Sun, 5 Oct 2014 17:19:13 +0000 (19:19 +0200) |
This should not happen anyway but better be safe than sorry.
src/utils/dbi.c | patch | blob | history |
diff --git a/src/utils/dbi.c b/src/utils/dbi.c
index 73fc6b77a4e2582b431ac109a1e9147f66535360..261d3b249e5265b089db34f9e4c54e64de34d017 100644 (file)
--- a/src/utils/dbi.c
+++ b/src/utils/dbi.c
client->conn = dbi_conn_open(driver);
if (! client->conn) {
- sdb_log(SDB_LOG_ERR, "dbi: failed to open connection "
- "object.");
+ sdb_log(SDB_LOG_ERR, "dbi: failed to open connection object.");
return -1;
}
dbi_conn_close(client->conn);
client->conn = NULL;
- dbi_shutdown_r(client->inst);
+ if (client->inst)
+ dbi_shutdown_r(client->inst);
+ client->inst = NULL;
if (client->options)
sdb_dbi_options_destroy(client->options);