Mercurial > dovecot > core-2.2
changeset 21469:2c6352a4656d
lib-storage: Once hooks have run, set vlast to NULL to make sure it's not used
The functions can't be correctly overridden outside their own specific
hooks. It would work only if hook_build_update() is called afterwards and
currently there's no public API for that.
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Fri, 03 Feb 2017 16:16:26 +0200 |
parents | 8506c5d8b5cc |
children | b4c91e015ec7 |
files | src/lib-storage/mail-storage-hooks.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/mail-storage-hooks.c Sat Feb 04 10:42:21 2017 +0200 +++ b/src/lib-storage/mail-storage-hooks.c Fri Feb 03 16:16:26 2017 +0200 @@ -273,6 +273,7 @@ hook_build_update(ctx, user->vlast); } T_END; } + user->vlast = NULL; pool_unref(&ctx->pool); } @@ -326,6 +327,7 @@ hook_build_update(ctx, storage->vlast); } T_END; } + storage->vlast = NULL; pool_unref(&ctx->pool); } @@ -342,6 +344,7 @@ hook_build_update(ctx, list->vlast); } T_END; } + list->vlast = NULL; pool_unref(&ctx->pool); } @@ -358,6 +361,7 @@ hook_build_update(ctx, box->vlast); } T_END; } + box->vlast = NULL; pool_unref(&ctx->pool); } @@ -386,5 +390,6 @@ hook_build_update(ctx, pmail->vlast); } T_END; } + pmail->vlast = NULL; pool_unref(&ctx->pool); }