From acf91ff75ea5bcca39c8c1be709d5a712ebb6d64 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 14 May 2021 16:22:28 +0200 Subject: [PATCH] version: free the openldap info correctly ... to avoid memory leaks. Follow-up to: bf0feae7768d9 Closes #7061 --- lib/version.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/version.c b/lib/version.c index d18cf0e3f..b67b9a466 100644 --- a/lib/version.c +++ b/lib/version.c @@ -267,6 +267,8 @@ char *curl_version(void) msnprintf(ldap_buf, sizeof(ldap_buf), "%s/%u.%u.%u", api.ldapai_vendor_name, major, minor, patch); src[i++] = ldap_buf; + ldap_memfree(api.ldapai_vendor_name); + ber_memvfree((void **)api.ldapai_extensions); } } #endif