Fix for possible memory leak in mTLS.
Freeing resources returned by X509_get_ext_d2i method.
Tested:
Manual test were made to verify if TLS authentication works
as before.
Signed-off-by: Zbigniew Kurzynski <zbigniew.kurzynski@intel.com>
Change-Id: I937d7a13b9b63501fd58b846e6050c5523f76cc4
diff --git a/http/http_connection.h b/http/http_connection.h
index 5155779..4cd1e89 100644
--- a/http/http_connection.h
+++ b/http/http_connection.h
@@ -374,6 +374,7 @@
"be used for user authentication";
return true;
}
+ ASN1_BIT_STRING_free(usage);
// Determine that ExtendedKeyUsage includes Client Auth
@@ -396,6 +397,7 @@
break;
}
}
+ sk_ASN1_OBJECT_free(extUsage);
// Certificate has to have proper key usages set
if (!isExKeyUsageClientAuth)