[dovecot-cvs] dovecot/src/lib-storage/subscription-file subscription-file.c, 1.27, 1.28

cras at dovecot.org cras at dovecot.org
Sat Jan 14 20:48:02 EET 2006


Update of /var/lib/cvs/dovecot/src/lib-storage/subscription-file
In directory talvi:/tmp/cvs-serv16037/lib-storage/subscription-file

Modified Files:
	subscription-file.c 
Log Message:
deinit, unref, destroy, close, free, etc. functions now take a pointer to
their data pointer, and set it to NULL. This makes double-frees less likely
to cause security holes.



Index: subscription-file.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/subscription-file/subscription-file.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- subscription-file.c	13 Jan 2006 20:26:37 -0000	1.27
+++ subscription-file.c	14 Jan 2006 18:47:58 -0000	1.28
@@ -139,8 +139,8 @@
 	}
 
 	if (input != NULL)
-		i_stream_unref(input);
-	o_stream_unref(output);
+		i_stream_unref(&input);
+	o_stream_unref(&output);
 
 	if (failed || (set && found) || (!set && !found)) {
 		if (file_dotlock_delete(&dotlock) < 0) {
@@ -190,7 +190,7 @@
 
 	failed = ctx->failed;
 	if (ctx->input != NULL)
-		i_stream_unref(ctx->input);
+		i_stream_unref(&ctx->input);
 	pool_unref(ctx->pool);
 
 	return failed ? -1 : 0;



More information about the dovecot-cvs mailing list