Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I fixed the following valgrind reported memory leaks with this fix
==13135==
==13135== 40 bytes in 4 blocks are definitely lost in loss record 1,451 of 2,109
==13135== at 0x4C2D03B: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==13135== by 0xB2C8BE9: strdup (strdup.c:42)
==13135== by 0x6E62B77: function_conversation(int, pam_message const**, pam_response**, void*)
==13135== by 0x4E40AFD: _get_authtok (pam_ldap.c:3354)
==13135== by 0x4E41058: pam_sm_authenticate (pam_ldap.c:3485)
==13135== by 0xC0B1443: _pam_dispatch_aux (pam_dispatch.c:110)
==13135== by 0xC0B1443: _pam_dispatch (pam_dispatch.c:426)
==13135== by 0xC0B0D7A: pam_authenticate (pam_auth.c:34)
==13135==
==13135== 58 (32 direct, 26 indirect) bytes in 1 blocks are definitely lost in loss record 1,594 of 2,109
==13135== at 0x4C2EEEE: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==13135== by 0x4E3C3DB: _read_config (pam_ldap.c:930)
==13135== by 0x4E3FEB2: _pam_ldap_get_session (pam_ldap.c:2935)
==13135== by 0x4E40E80: pam_sm_authenticate (pam_ldap.c:3450)
==13135== by 0xC0B1443: _pam_dispatch_aux (pam_dispatch.c:110)
==13135== by 0xC0B1443: _pam_dispatch (pam_dispatch.c:426)
==13135== by 0xC0B0D7A: pam_authenticate (pam_auth.c:34)