Skip to content

Commit

Permalink
Fix memory leak in ntlm_support
Browse files Browse the repository at this point in the history
Not really important but prevents running the NTLM
t_client tests with ASAN enabled.

Change-Id: If472398d4ff8323de485f084a07160b365dfc501
Signed-off-by: Frank Lichtenheld <[email protected]>
Acked-by: Lev Stipakov <[email protected]>
Message-Id: <[email protected]>
URL: https://www.mail-archive.com/[email protected]/msg30049.html
Signed-off-by: Gert Doering <[email protected]>
  • Loading branch information
flichtenheld authored and cron2 committed Dec 9, 2024
1 parent 9343cd1 commit ae82631
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/ntlm_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
int
main(void)
{
#ifdef NTLM
#if defined(ENABLE_CRYPTO_OPENSSL)
crypto_load_provider("legacy");
crypto_load_provider("default");
provider_t *legacy = crypto_load_provider("legacy");
provider_t *def = crypto_load_provider("default");
#endif
#ifdef NTLM
if (!md_valid("MD4"))
{
msg(M_FATAL, "MD4 not supported");
Expand All @@ -46,6 +46,10 @@ main(void)
{
msg(M_FATAL, "MD5 not supported");
}
#if defined(ENABLE_CRYPTO_OPENSSL)
crypto_unload_provider("legacy", legacy);
crypto_unload_provider("default", def);
#endif
#else /* ifdef NTLM */
msg(M_FATAL, "NTLM support not compiled in");
#endif
Expand Down

0 comments on commit ae82631

Please sign in to comment.