dovecot-1.2-sieve: Fixed potential deinitialization problem in i...

pigeonhole at rename-it.nl pigeonhole at rename-it.nl
Fri May 14 13:17:31 EEST 2010


details:   http://hg.rename-it.nl/dovecot-1.2-sieve/rev/41df7edbee74
changeset: 1255:41df7edbee74
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Fri May 14 11:25:25 2010 +0200
description:
Fixed potential deinitialization problem in interpreter.

diffstat:

 src/lib-sieve/sieve-interpreter.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (23 lines):

diff -r bf7636cbeba9 -r 41df7edbee74 src/lib-sieve/sieve-interpreter.c
--- a/src/lib-sieve/sieve-interpreter.c	Fri May 14 11:23:55 2010 +0200
+++ b/src/lib-sieve/sieve-interpreter.c	Fri May 14 11:25:25 2010 +0200
@@ -134,16 +134,15 @@
 	const struct sieve_interpreter_extension_reg *eregs;
 	unsigned int ext_count, i;
 
-	sieve_binary_unref(&(*interp)->runenv.sbin);
-
-	sieve_error_handler_unref(&(*interp)->ehandler);
-
 	/* Signal registered extensions that the interpreter is being destroyed */
 	eregs = array_get(&(*interp)->extensions, &ext_count);
 	for ( i = 0; i < ext_count; i++ ) {
 		if ( eregs[i].intext != NULL && eregs[i].intext->free != NULL )
 			eregs[i].intext->free(eregs[i].ext, *interp, eregs[i].context);
 	}
+
+	sieve_binary_unref(&(*interp)->runenv.sbin);
+	sieve_error_handler_unref(&(*interp)->ehandler);
 		 
 	pool_unref(&((*interp)->pool));	
 	*interp = NULL;


More information about the dovecot-cvs mailing list