1
0
Эх сурвалжийг харах

Ticket #48366 - proxyauth does not work bound as directory manager

Description: Coverity Defect type: RESOURCE_LEAK
aclplugin.c:131,151: leaked_storage: Variable "proxy_dn" going out
of scope leaks the storage it points to.

Even if proxy_dn is allocated, the return value of proxyauth_get_dn
could be other than LDAP_SUCCESS.
Noriko Hosoi 9 жил өмнө
parent
commit
4c689e77b4

+ 1 - 1
ldap/servers/plugins/acl/aclplugin.c

@@ -122,8 +122,8 @@ aclplugin_preop_search ( Slapi_PBlock *pb )
 
 	if (LDAP_SUCCESS == proxyauth_get_dn(pb, &proxy_dn, &errtxt) && proxy_dn) {
 		isProxy = 1;
-		slapi_ch_free_string(&proxy_dn);
 	}
+	slapi_ch_free_string(&proxy_dn);
 
 	if ( isRoot && !isProxy) {
 		TNF_PROBE_1_DEBUG(aclplugin_preop_search_end ,"ACL","",