dovecot-2.0-pigeonhole: Fixed potential memory leak in generator.
pigeonhole at rename-it.nl
pigeonhole at rename-it.nl
Fri May 14 13:38:37 EEST 2010
details: http://hg.rename-it.nl/dovecot-2.0-pigeonhole/rev/0802941936fc
changeset: 1278:0802941936fc
user: Stephan Bosch <stephan at rename-it.nl>
date: Fri May 14 11:23:55 2010 +0200
description:
Fixed potential memory leak in generator.
diffstat:
src/lib-sieve/sieve-generator.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diffs (31 lines):
diff -r fccd0b381019 -r 0802941936fc src/lib-sieve/sieve-generator.c
--- a/src/lib-sieve/sieve-generator.c Fri May 14 12:37:39 2010 +0200
+++ b/src/lib-sieve/sieve-generator.c Fri May 14 11:23:55 2010 +0200
@@ -427,17 +427,20 @@
/* Load */
if ( ext->def != NULL && ext->def->generator_load != NULL &&
- !ext->def->generator_load(ext, &gentr->genenv) )
- return FALSE;
+ !ext->def->generator_load(ext, &gentr->genenv) ) {
+ result = FALSE;
+ }
}
/* Generate code */
- if ( !sieve_generate_block
- (&gentr->genenv, sieve_ast_root(gentr->genenv.ast)))
- result = FALSE;
- else if ( topmost )
- sieve_binary_activate(*sbin);
+ if ( result ) {
+ if ( !sieve_generate_block
+ (&gentr->genenv, sieve_ast_root(gentr->genenv.ast)))
+ result = FALSE;
+ else if ( topmost )
+ sieve_binary_activate(*sbin);
+ }
/* Cleanup */
More information about the dovecot-cvs
mailing list