[dovecot-cvs] dovecot/src/plugins/quota quota-storage.c,1.3,1.4

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


Update of /var/lib/cvs/dovecot/src/plugins/quota
In directory talvi:/tmp/cvs-serv16037/plugins/quota

Modified Files:
	quota-storage.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: quota-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/quota/quota-storage.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- quota-storage.c	14 Jan 2006 15:19:57 -0000	1.3
+++ quota-storage.c	14 Jan 2006 18:48:10 -0000	1.4
@@ -148,7 +148,7 @@
 	ret = qbox->save_hack ? 0 : quota_check(t, copy_dest_mail);
 
 	if (copy_dest_mail != dest_mail)
-		mail_free(copy_dest_mail);
+		mail_free(&copy_dest_mail);
 	return ret;
 }
 
@@ -196,7 +196,7 @@
 	ret = quota_check(ctx->transaction, save_dest_mail);
 
 	if (save_dest_mail != dest_mail)
-		mail_free(save_dest_mail);
+		mail_free(&save_dest_mail);
 	return ret;
 }
 



More information about the dovecot-cvs mailing list