From: Timo Sirainen Date: Thu, 19 Sep 2013 23:28:45 +0000 (+0300) Subject: lib-auth: Don't leave stale pointers to stack lying around in memory. X-Git-Tag: 2.2.6~46 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d5b366506a39870e6ea36dd89cf7ef548c5a9916;p=thirdparty%2Fdovecot%2Fcore.git lib-auth: Don't leave stale pointers to stack lying around in memory. --- diff --git a/src/lib-auth/auth-master.c b/src/lib-auth/auth-master.c index 3a7d357421..b59765cbc6 100644 --- a/src/lib-auth/auth-master.c +++ b/src/lib-auth/auth-master.c @@ -517,6 +517,7 @@ int auth_master_user_lookup(struct auth_master_connection *conn, *username_r = ctx.fields[0]; *fields_r = ctx.fields + 1; } + conn->reply_context = NULL; return ctx.return_value; } @@ -583,6 +584,7 @@ int auth_master_pass_lookup(struct auth_master_connection *conn, *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 @@ int auth_master_cache_flush(struct auth_master_connection *conn, (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 @@ auth_master_user_list_init(struct auth_master_connection *conn, ctx->failed = TRUE; io_loop_set_current(conn->prev_ioloop); conn->prefix = DEFAULT_USERDB_LOOKUP_PREFIX; + conn->reply_context = NULL; return ctx; }