dovecot-2.2: cassandra: Don't crash on failed queries.

dovecot at dovecot.org dovecot at dovecot.org
Wed Jun 10 13:11:42 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/0cf38b6b055d
changeset: 18833:0cf38b6b055d
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Jun 10 16:08:28 2015 +0300
description:
cassandra: Don't crash on failed queries.

diffstat:

 src/lib-sql/driver-cassandra.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (16 lines):

diff -r 1a778838d3e1 -r 0cf38b6b055d src/lib-sql/driver-cassandra.c
--- a/src/lib-sql/driver-cassandra.c	Tue Jun 09 19:32:09 2015 +0300
+++ b/src/lib-sql/driver-cassandra.c	Wed Jun 10 16:08:28 2015 +0300
@@ -437,8 +437,10 @@
 	db->cur_result = NULL;
 
 	driver_cassandra_set_idle(db);
-	cass_result_free(result->result);
-	cass_iterator_free(result->iterator);
+	if (result->result != NULL)
+		cass_result_free(result->result);
+	if (result->iterator != NULL)
+		cass_iterator_free(result->iterator);
 	cass_statement_free(result->statement);
 	pool_unref(&result->row_pool);
 	i_free(result->query);


More information about the dovecot-cvs mailing list