[dovecot-cvs] dovecot/src/plugins/acl acl-cache.c,1.2.2.1,1.2.2.2

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


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

Modified Files:
      Tag: branch_1_0
	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.2.2.1
retrieving revision 1.2.2.2
diff -u -d -r1.2.2.1 -r1.2.2.2
--- acl-cache.c	30 May 2006 12:20:37 -0000	1.2.2.1
+++ acl-cache.c	4 Aug 2006 16:32:59 -0000	1.2.2.2
@@ -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