Browse Source

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

Rich Megginson 17 years ago
parent
commit
f38168d047
1 changed files with 3 additions and 2 deletions
  1. 3 2
      ldap/servers/plugins/acl/acleffectiverights.c

+ 3 - 2
ldap/servers/plugins/acl/acleffectiverights.c

@@ -649,6 +649,7 @@ _ger_get_attrs_rights (
 					}
 					}
 				}
 				}
 			}
 			}
+			slapi_valueset_free(objclassvals);
 		}
 		}
 
 
 		/* get operational attrs */
 		/* get operational attrs */
@@ -706,9 +707,9 @@ _ger_get_attrs_rights (
 					}
 					}
 				}
 				}
 			}
 			}
-			charray_free(allattrs);
-			charray_free(opattrs);
 		}
 		}
+		charray_free(allattrs);
+		charray_free(opattrs);
 	}
 	}
 	else
 	else
 	{
 	{