dovecot-2.2: lib-auth: Don't leave stale pointers to stack lying...

dovecot at dovecot.org dovecot at dovecot.org
Fri Sep 20 02:28:59 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/5ae2ae657a95
changeset: 16778:5ae2ae657a95
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Sep 20 02:28:45 2013 +0300
description:
lib-auth: Don't leave stale pointers to stack lying around in memory.

diffstat:

 src/lib-auth/auth-master.c |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (35 lines):

diff -r c8b1e5833a28 -r 5ae2ae657a95 src/lib-auth/auth-master.c
--- a/src/lib-auth/auth-master.c	Fri Sep 20 00:59:36 2013 +0300
+++ b/src/lib-auth/auth-master.c	Fri Sep 20 02:28:45 2013 +0300
@@ -517,6 +517,7 @@
 		*username_r = ctx.fields[0];
 		*fields_r = ctx.fields + 1;
 	}
+	conn->reply_context = NULL;
 	return ctx.return_value;
 }
 
@@ -583,6 +584,7 @@
 
 	*fields_r = ctx.fields != NULL ? ctx.fields :
 		p_new(pool, const char *, 1);
+	conn->reply_context = NULL;
 	return ctx.return_value;
 }
 
@@ -625,6 +627,7 @@
 	(void)auth_master_run_cmd(conn, str_c(str));
 	conn->prefix = DEFAULT_USERDB_LOOKUP_PREFIX;
 
+	conn->reply_context = NULL;
 	return *count_r == UINT_MAX ? -1 : 0;
 }
 
@@ -687,6 +690,7 @@
 		ctx->failed = TRUE;
 	io_loop_set_current(conn->prev_ioloop);
 	conn->prefix = DEFAULT_USERDB_LOOKUP_PREFIX;
+	conn->reply_context = NULL;
 	return ctx;
 }
 


More information about the dovecot-cvs mailing list