[dovecot-cvs] dovecot/src/plugins/acl acl-cache.c,1.4,1.5

cras at dovecot.org cras at dovecot.org
Fri Aug 4 19:33:06 EEST 2006


Update of /var/lib/cvs/dovecot/src/plugins/acl
In directory talvi:/tmp/cvs-serv29710

Modified Files:
	acl-cache.c 
Log Message:
Crashfix



Index: acl-cache.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/acl/acl-cache.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- acl-cache.c	28 Jun 2006 13:10:55 -0000	1.4
+++ acl-cache.c	4 Aug 2006 16:33:02 -0000	1.5
@@ -80,7 +80,8 @@
 		if (obj_cache->my_neg_rights[i] != NULL)
 			acl_cache_mask_deinit(&obj_cache->my_neg_rights[i]);
 	}
-	if (obj_cache->my_current_rights != NULL)
+	if (obj_cache->my_current_rights != NULL &&
+	    obj_cache->my_current_rights != &negative_cache_entry)
 		acl_cache_mask_deinit(&obj_cache->my_current_rights);
 	i_free(obj_cache->name);
 	i_free(obj_cache);
@@ -241,7 +242,10 @@
 
 	if (changed && obj_cache->my_current_rights != NULL) {
 		/* current rights need to be recalculated */
-		acl_cache_mask_deinit(&obj_cache->my_current_rights);
+		if (obj_cache->my_current_rights == &negative_cache_entry)
+			obj_cache->my_current_rights = NULL;
+		else
+			acl_cache_mask_deinit(&obj_cache->my_current_rights);
 	}
 }
 



More information about the dovecot-cvs mailing list