dovecot-2.0-pigeonhole: Regex match: fixed segfault at deinitial...
pigeonhole at rename-it.nl
pigeonhole at rename-it.nl
Thu Aug 12 15:43:14 EEST 2010
details: http://hg.rename-it.nl/dovecot-2.0-pigeonhole/rev/32fd91cbe1e0
changeset: 1369:32fd91cbe1e0
user: Stephan Bosch <stephan at rename-it.nl>
date: Thu Aug 12 14:43:04 2010 +0200
description:
Regex match: fixed segfault at deinitialization.
diffstat:
src/lib-sieve/plugins/regex/mcht-regex.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (18 lines):
diff -r f6f169a146df -r 32fd91cbe1e0 src/lib-sieve/plugins/regex/mcht-regex.c
--- a/src/lib-sieve/plugins/regex/mcht-regex.c Thu Aug 12 14:41:46 2010 +0200
+++ b/src/lib-sieve/plugins/regex/mcht-regex.c Thu Aug 12 14:43:04 2010 +0200
@@ -368,9 +368,11 @@
unsigned int count, i;
/* Clean up compiled regular expressions */
- rkeys = array_get_modifiable(&ctx->reg_expressions, &count);
- for ( i = 0; i < count; i++ ) {
- regfree(&rkeys[i].regexp);
+ if ( array_is_created(&ctx->reg_expressions) ) {
+ rkeys = array_get_modifiable(&ctx->reg_expressions, &count);
+ for ( i = 0; i < count; i++ ) {
+ regfree(&rkeys[i].regexp);
+ }
}
}
More information about the dovecot-cvs
mailing list