]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
version: free the openldap info correctly
authorDaniel Stenberg <daniel@haxx.se>
Fri, 14 May 2021 14:22:28 +0000 (16:22 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 15 May 2021 15:47:35 +0000 (17:47 +0200)
... to avoid memory leaks.

Follow-up to: bf0feae7768d9
Closes #7061

lib/version.c

index d18cf0e3f14f5b5862e879c25f725d8c69b9c604..b67b9a46605239ade0d0989f58aa1bfb1f091aac 100644 (file)
@@ -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