Subject: | potential memleak of pol_entry->name in populate_policy() |
In populate_policy() src/plugins/kdb/ldap/libkdb_ldap/ldap_pwd_policy.c:
pol_entry->name = strdup(pol_name);
and later:
if (st)
goto cleanup;
/*
* We don't store the policy refcnt, because principals might be
maintained
* outside of kadmin. Instead, we will check for principal
references when
* policies are deleted.
*/
pol_entry->policy_refcnt = 0;
cleanup:
return st;
So if st is non-zero then pol_entry->name will be leaked.
pol_entry->name = strdup(pol_name);
and later:
if (st)
goto cleanup;
/*
* We don't store the policy refcnt, because principals might be
maintained
* outside of kadmin. Instead, we will check for principal
references when
* policies are deleted.
*/
pol_entry->policy_refcnt = 0;
cleanup:
return st;
So if st is non-zero then pol_entry->name will be leaked.