--- ngx_http_grpc_module.c.orig	2019-12-12 13:54:50.117489900 -0800
+++ ngx_http_grpc_module.c	2019-12-12 13:56:58.061122800 -0800
@@ -4568,11 +4568,13 @@
     if (ngx_ssl_create(glcf->upstream.ssl, glcf->ssl_protocols, NULL)
         != NGX_OK)
     {
+	ngx_pfree(glcf->upstream.ssl); /* release previous memory request */
         return NGX_ERROR;
     }
 
     cln = ngx_pool_cleanup_add(cf->pool, 0);
     if (cln == NULL) {
+	ngx_pfree(glcf->upstream.ssl); /* release previous memory request */
         return NGX_ERROR;
     }
 
