dovecot-2.2: lib-sql: sql_result.free() should never be reached ...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Sep 2 14:17:41 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/97ff15e9a7fd
changeset: 19056:97ff15e9a7fd
user: Timo Sirainen <tss at iki.fi>
date: Wed Sep 02 17:16:41 2015 +0300
description:
lib-sql: sql_result.free() should never be reached from the query callback.
This code was probably added before sql_result refcounting.
diffstat:
src/lib-sql/driver-cassandra.c | 8 +-------
src/lib-sql/driver-pgsql.c | 8 +-------
2 files changed, 2 insertions(+), 14 deletions(-)
diffs (36 lines):
diff -r e157d13efac9 -r 97ff15e9a7fd src/lib-sql/driver-cassandra.c
--- a/src/lib-sql/driver-cassandra.c Tue Sep 01 16:25:11 2015 +0300
+++ b/src/lib-sql/driver-cassandra.c Wed Sep 02 17:16:41 2015 +0300
@@ -431,13 +431,7 @@
struct cassandra_db *db = (struct cassandra_db *)_result->db;
struct cassandra_result *result = (struct cassandra_result *)_result;
- if (result->api.callback) {
- /* we're coming here from a user's sql_result_free() that's
- being called from a callback. we'll do this later,
- so ignore. */
- return;
- }
-
+ i_assert(!result->api.callback);
i_assert(db->cur_result == result);
i_assert(result->callback == NULL);
diff -r e157d13efac9 -r 97ff15e9a7fd src/lib-sql/driver-pgsql.c
--- a/src/lib-sql/driver-pgsql.c Tue Sep 01 16:25:11 2015 +0300
+++ b/src/lib-sql/driver-pgsql.c Wed Sep 02 17:16:41 2015 +0300
@@ -328,13 +328,7 @@
struct pgsql_result *result = (struct pgsql_result *)_result;
bool success;
- if (result->api.callback) {
- /* we're coming here from a user's sql_result_free() that's
- being called from a callback. we'll do this later,
- so ignore. */
- return;
- }
-
+ i_assert(!result->api.callback);
i_assert(db->cur_result == result);
i_assert(result->callback == NULL);
More information about the dovecot-cvs
mailing list