noirello / bonsai

Simple Python 3 module for LDAP, using libldap2 and winldap C libraries.
MIT License
116 stars 32 forks source link

native memleak in `ldap-xplat.c` (`create_krb5_cred`) #84

Closed dafanasiev closed 8 months ago

dafanasiev commented 8 months ago

You allocate creds in ldap-xplat.c#L213 and ldap-xplat.c#L230 but newer free it (need call krb5_free_cred_contents if memory is allocated successfully).

noirello commented 8 months ago

Thank you, I guess that function call should be added to the end part of the create_krb5_cred function.

Could you open a PR with the fix?

noirello commented 8 months ago

The PR has been merged to the dev branch.