dovecot-2.2-pigeonhole: Fixed a few resource leaks caused by pre...

pigeonhole at rename-it.nl pigeonhole at rename-it.nl
Thu Sep 20 01:51:14 EEST 2012


details:   http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/3d3d8549c834
changeset: 1670:3d3d8549c834
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Thu Sep 20 00:51:09 2012 +0200
description:
Fixed a few resource leaks caused by previous change.

diffstat:

 src/lib-sieve/plugins/include/ext-include-binary.c |  3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diffs (27 lines):

diff -r 7e2dbfc9206d -r 3d3d8549c834 src/lib-sieve/plugins/include/ext-include-binary.c
--- a/src/lib-sieve/plugins/include/ext-include-binary.c	Thu Sep 20 00:22:36 2012 +0200
+++ b/src/lib-sieve/plugins/include/ext-include-binary.c	Thu Sep 20 00:51:09 2012 +0200
@@ -333,6 +333,7 @@
 		if ( sieve_script_open(script, &error) < 0 ) {			
 			if ( error != SIEVE_ERROR_NOT_FOUND ) {
 				/* No, recompile */
+				sieve_script_unref(&script);
 				return FALSE;
 			}
 
@@ -344,6 +345,7 @@
 						"include: script '%s' contained in binary %s is now missing, "
 						"so recompile", str_c(script_name), sieve_binary_path(sbin));
 				}
+				sieve_script_unref(&script);
 				return FALSE;
 			}
 
@@ -356,6 +358,7 @@
 					"include: script '%s' is missing in binary %s, but is now available, "
 					"so recompile", str_c(script_name), sieve_binary_path(sbin));
 			}
+			sieve_script_unref(&script);
 			return FALSE;
 		}
 


More information about the dovecot-cvs mailing list