dovecot-2.2: pgsql: Fixed a potential crash if connection got cl...
dovecot at dovecot.org
dovecot at dovecot.org
Sun May 20 03:26:30 EEST 2012
details: http://hg.dovecot.org/dovecot-2.2/rev/e05be9afaed0
changeset: 14390:e05be9afaed0
user: Timo Sirainen <tss at iki.fi>
date: Mon Mar 26 20:38:18 2012 +0300
description:
pgsql: Fixed a potential crash if connection got closed during synchronous query.
diffstat:
src/lib-sql/driver-pgsql.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diffs (13 lines):
diff -r bcc5e71650b9 -r e05be9afaed0 src/lib-sql/driver-pgsql.c
--- a/src/lib-sql/driver-pgsql.c Mon Mar 26 18:17:52 2012 +0300
+++ b/src/lib-sql/driver-pgsql.c Mon Mar 26 20:38:18 2012 +0300
@@ -603,6 +603,9 @@
/* we don't end up in pgsql's free function, so sync_result
won't be set to NULL if we don't do it here. */
db->sync_result = NULL;
+ } else if (result == NULL) {
+ result = &sql_not_connected_result;
+ result->refcount++;
}
i_assert(db->io == NULL);
More information about the dovecot-cvs
mailing list