From 3c876991c879f5017288b08f354921f199958180 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Tue, 19 Feb 2013 18:39:46 +0100 Subject: [PATCH] utils dbi: Avoid segfault when executing queries when not connected. Apparently, the libdbi functions don't check for that condition. --- src/utils/dbi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/dbi.c b/src/utils/dbi.c index ee2280c..ea846b0 100644 --- a/src/utils/dbi.c +++ b/src/utils/dbi.c @@ -355,7 +355,7 @@ sdb_dbi_exec_query(sdb_dbi_client_t *client, const char *query, int status; - if ((! client) || (! query)) + if ((! client) || (! client->conn) || (! query)) return -1; res = dbi_conn_query(client->conn, query); -- 2.30.2