mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-10-25 06:38:02 -05:00
ipa_cldap: fix memory leak
ipa_cldap_encode_netlogon() allocates memory to store binary data as part of berval (bv_val) when processing a CLDAP packet request from a worker. The data is used by ipa_cldap_respond() but bv_val is not freed later on. This commit is adding the corresponding free() after ipa_cldap_respond() is completed. Discovered by LeakSanitizer Fixes: https://pagure.io/freeipa/issue/9110 Signed-off-by: Francisco Trivino <ftrivino@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com> Reviewed-By: Rob Crittenden <rcritten@redhat.com> Reviewed-By: Thierry Bordaz <tbordaz@redhat.com>
This commit is contained in:
1 parent
46ccf006ff
commit
3de5e4e1f7
1 file changed
+1
@@ -287,6 +287,7 @@ done:
|
||||
ipa_cldap_respond(ctx, req, &reply);
|
||||
|
||||
ipa_cldap_free_kvps(&req->kvps);
|
||||
free(reply.bv_val);
|
||||
free(req);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user