mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-26 16:16:31 -06:00
Fix CID 11019: Resource leak
https://fedorahosted.org/freeipa/ticket/2037
This commit is contained in:
parent
8276d5d55f
commit
299c91df92
@ -263,6 +263,13 @@ int ipadb_get_connection(struct ipadb_context *ipactx)
|
||||
|
||||
done:
|
||||
ldap_msgfree(res);
|
||||
|
||||
ldap_value_free_len(vals);
|
||||
for (i = 0; i < c && cvals[i]; i++) {
|
||||
free(cvals[i]);
|
||||
}
|
||||
free(cvals);
|
||||
|
||||
if (ret) {
|
||||
if (ipactx->lcontext) {
|
||||
ldap_unbind_ext_s(ipactx->lcontext, NULL, NULL);
|
||||
@ -274,12 +281,6 @@ done:
|
||||
return EIO;
|
||||
}
|
||||
|
||||
ldap_value_free_len(vals);
|
||||
for (i = 0; i < c; i++) {
|
||||
free(cvals[i]);
|
||||
}
|
||||
free(cvals);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user