dovecot-2.2: fts: Fixed crash on error handling
dovecot at dovecot.org
dovecot at dovecot.org
Fri Aug 10 05:24:41 EEST 2012
details: http://hg.dovecot.org/dovecot-2.2/rev/d499f6d0ca68
changeset: 14832:d499f6d0ca68
user: Timo Sirainen <tss at iki.fi>
date: Wed Aug 01 22:39:57 2012 +0300
description:
fts: Fixed crash on error handling
diffstat:
src/plugins/fts/fts-search.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diffs (25 lines):
diff -r 47ebcf37af3d -r d499f6d0ca68 src/plugins/fts/fts-search.c
--- a/src/plugins/fts/fts-search.c Wed Aug 01 21:14:30 2012 +0300
+++ b/src/plugins/fts/fts-search.c Wed Aug 01 22:39:57 2012 +0300
@@ -199,13 +199,15 @@
struct mail_search_arg *args,
bool and_args)
{
- if (!fctx->virtual_mailbox) {
- if (fts_search_lookup_level_single(fctx, args, and_args) < 0)
- return -1;
- } else T_BEGIN {
- if (fts_search_lookup_level_multi(fctx, args, and_args) < 0)
- return -1;
+ int ret;
+
+ T_BEGIN {
+ ret = !fctx->virtual_mailbox ?
+ fts_search_lookup_level_single(fctx, args, and_args) :
+ fts_search_lookup_level_multi(fctx, args, and_args);
} T_END;
+ if (ret < 0)
+ return -1;
for (; args != NULL; args = args->next) {
if (args->type != SEARCH_OR && args->type != SEARCH_SUB)
More information about the dovecot-cvs
mailing list