Mercurial > dovecot > core-2.2
changeset 21717:1085fea7435f
db-oauth2: Make sure request is removed only once
Callback might be called twice.
author | Aki Tuomi <aki.tuomi@dovecot.fi> |
---|---|
date | Tue, 07 Mar 2017 10:09:20 +0200 |
parents | 8afc52576667 |
children | 220d1290751b |
files | src/auth/db-oauth2.c |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/auth/db-oauth2.c Tue Mar 07 10:08:08 2017 +0200 +++ b/src/auth/db-oauth2.c Tue Mar 07 10:09:20 2017 +0200 @@ -408,10 +408,10 @@ i_assert(req->result == PASSDB_RESULT_OK || (!success && error != NULL)); - if (callback != NULL) + if (callback != NULL) { + DLLIST_REMOVE(&req->db->head, req); callback(req->db, success, req, error, req->context); - - DLLIST_REMOVE(&req->db->head, req); + } } static bool