mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Fix CID 11019: Resource leak
https://fedorahosted.org/freeipa/ticket/2037
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user