dovecot-2.0-sieve: Spamtest extension: fixed bugs in extension u...
pigeonhole at rename-it.nl
pigeonhole at rename-it.nl
Fri Jan 8 00:58:44 EET 2010
details: http://hg.rename-it.nl/dovecot-2.0-sieve/rev/d53b935ef35f
changeset: 1182:d53b935ef35f
user: Stephan Bosch <stephan at rename-it.nl>
date: Sun Jan 03 22:28:33 2010 +0100
description:
Spamtest extension: fixed bugs in extension unloading and in strlen value extraction.
diffstat:
src/lib-sieve/plugins/spamvirustest/ext-spamvirustest-common.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diffs (48 lines):
diff -r 596dc3b8be61 -r d53b935ef35f src/lib-sieve/plugins/spamvirustest/ext-spamvirustest-common.c
--- a/src/lib-sieve/plugins/spamvirustest/ext-spamvirustest-common.c Sun Jan 03 22:24:33 2010 +0100
+++ b/src/lib-sieve/plugins/spamvirustest/ext-spamvirustest-common.c Sun Jan 03 22:28:33 2010 +0100
@@ -152,8 +152,8 @@
char ch = *p;
if ( *str_value == '\0' ) {
- *error_r = "empty value";
- return FALSE;
+ *value_r = 0;
+ return TRUE;
}
while ( *p == ch ) p++;
@@ -306,6 +306,7 @@
if ( *context != NULL ) {
ext_spamvirustest_unload(ext);
+ *context = NULL;
}
/* FIXME:
@@ -360,7 +361,8 @@
sieve_sys_warning("%s: extension not configured, "
"tests will always match against \"0\"", ext_name);
ext_spamvirustest_config_free(ext_data);
- pool_unref(&ext_data->pool);
+ pool_unref(&pool);
+ *context = NULL;
} else {
*context = (void *) ext_data;
}
@@ -373,10 +375,12 @@
struct ext_spamvirustest_data *ext_data =
(struct ext_spamvirustest_data *) ext->context;
- ext_spamvirustest_header_spec_free(&ext_data->status_header);
- ext_spamvirustest_header_spec_free(&ext_data->max_header);
+ if ( ext_data != NULL ) {
+ ext_spamvirustest_header_spec_free(&ext_data->status_header);
+ ext_spamvirustest_header_spec_free(&ext_data->max_header);
- pool_unref(&ext_data->pool);
+ pool_unref(&ext_data->pool);
+ }
}
/*
More information about the dovecot-cvs
mailing list