Mercurial > dovecot > original-hg > dovecot-1.2
changeset 2887:70ce8c45e86b HEAD
Don't access freed memory.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 24 Nov 2004 18:46:15 +0200 |
parents | 634cf6aa34d1 |
children | c1b4d0e7dff0 |
files | src/login-common/master.c |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/login-common/master.c Wed Nov 24 18:44:11 2004 +0200 +++ b/src/login-common/master.c Wed Nov 24 18:46:15 2004 +0200 @@ -24,16 +24,20 @@ static void request_handle(struct master_login_reply *reply) { struct client *client; + master_callback_t *master_callback; client = hash_lookup(master_requests, POINTER_CAST(reply->tag)); if (client == NULL) i_fatal("Master sent reply with unknown tag %u", reply->tag); + master_callback = client->master_callback; client->master_tag = 0; - client->master_callback(client, reply->success); client->master_callback = NULL; hash_remove(master_requests, POINTER_CAST(reply->tag)); + + master_callback(client, reply->success); + /* NOTE: client may be destroyed now */ } void master_request_login(struct client *client, master_callback_t *callback,