From cef3e62d2b776e1fdf237b5277e94d482c15a541 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Sun, 30 Nov 2008 16:07:11 +0000 Subject: [PATCH] Don't clobber passed GENERAL_NAME on error. --- crypto/x509v3/v3_alt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crypto/x509v3/v3_alt.c b/crypto/x509v3/v3_alt.c index e7a25a8c87..58b2952478 100644 --- a/crypto/x509v3/v3_alt.c +++ b/crypto/x509v3/v3_alt.c @@ -527,7 +527,8 @@ GENERAL_NAME *v2i_GENERAL_NAME_ex(GENERAL_NAME *out, return gen; err: - GENERAL_NAME_free(gen); + if (!out) + GENERAL_NAME_free(gen); return NULL; } -- 2.25.1