[Fedora-directory-commits] ldapserver/ldap/servers/plugins/acl acleffectiverights.c, 1.12, 1.13

Richard Allen Megginson (rmeggins) fedora-directory-commits at redhat.com
Mon Aug 11 17:02:03 UTC 2008


Author: rmeggins

Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/acl
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17702/ldapserver/ldap/servers/plugins/acl

Modified Files:
	acleffectiverights.c 
Log Message:
Resolves: bug 457156
Bug Description: GER: allow GER for non-existing entries (phase 2)
Reviewed by: nhosoi (Thanks!)
Fix Description: There are a couple of memory leaks in the code.  acleffectiverights.c line 617 calls slapi_attr_get_valueset to get the list of objectclass values in objclassvals - this function allocates memory (returns a dup of the list) but this is not freed.  The fix is to call slapi_valueset_free() to free it.  The allattrs and opattrs arrays are not freed in all conditions.  The fix is to make sure they are freed in all conditions.
Platforms tested: RHEL5, Fedora 8
Flag Day: no
Doc impact: no



Index: acleffectiverights.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/acl/acleffectiverights.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- acleffectiverights.c	31 Jul 2008 21:27:26 -0000	1.12
+++ acleffectiverights.c	11 Aug 2008 17:02:00 -0000	1.13
@@ -649,6 +649,7 @@
 					}
 				}
 			}
+			slapi_valueset_free(objclassvals);
 		}
 
 		/* get operational attrs */
@@ -706,9 +707,9 @@
 					}
 				}
 			}
-			charray_free(allattrs);
-			charray_free(opattrs);
 		}
+		charray_free(allattrs);
+		charray_free(opattrs);
 	}
 	else
 	{




More information about the Fedora-directory-commits mailing list