Ensure the WPACKET gets cleaned up in the event of an error
[openssl.git] / ssl / statem / statem_clnt.c
index b6895f5762dcf067a54c9dd4149ae069a0c37447..4f123ddc981ebe8bc1f478c964b0ad8f8b73c568 100644 (file)
@@ -875,6 +875,7 @@ int tls_construct_client_hello(SSL *s)
     return 1;
  err:
     ossl_statem_set_error(s);
+    WPACKET_cleanup(&pkt);
     return 0;
 }