Skip to content

Commit bc9707b

Browse files
committed
Fixes #111030 - Memory leak in parse_name
1 parent fc7103f commit bc9707b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

PKCS10.xs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ X509_NAME *parse_name(char *subject, long chtype, int multirdn)
6464

6565
X509_NAME *n = NULL;
6666

67-
if (!buf || !ne_types || !ne_values)
67+
if (!buf || !ne_types || !ne_values || !mval)
6868
{
6969
croak("malloc error\n");
7070
goto error;
@@ -173,6 +173,8 @@ X509_NAME *parse_name(char *subject, long chtype, int multirdn)
173173
OPENSSL_free(ne_types);
174174
if (buf)
175175
OPENSSL_free(buf);
176+
if (mval)
177+
OPENSSL_free(mval);
176178
return NULL;
177179
}
178180

0 commit comments

Comments
 (0)