Noticed this while looking at the Clang Analysis Report[1] as the
only memory leak in the report and thought why not fix it :)
[1] https://jenkins.mono-project.com/job/test-mono-mainline-staticanalysis/Clang_Analysis_Report/
return NULL;
store_lookup = X509_STORE_add_lookup (mono_btls_x509_store_peek_store (store), method);
- if (!store_lookup)
+ if (!store_lookup) {
+ OPENSSL_free (lookup);
return NULL;
+ }
memset (lookup, 0, sizeof(MonoBtlsX509Lookup));
// The X509_STORE owns the X509_LOOKUP.