mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
Fix ASN1_STRING leak in create_by_NID and create_by_txt
This commit is contained in:
10
src/x509.c
10
src/x509.c
@ -11125,6 +11125,11 @@ err:
|
||||
dataSz) == WOLFSSL_SUCCESS) {
|
||||
ne->set = 1;
|
||||
}
|
||||
else {
|
||||
/* Free the ASN1_STRING if it is not set. */
|
||||
wolfSSL_ASN1_STRING_free(ne->value);
|
||||
ne->value = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -11174,6 +11179,11 @@ err:
|
||||
== WOLFSSL_SUCCESS) {
|
||||
ne->set = 1;
|
||||
}
|
||||
else {
|
||||
/* Free the ASN1_STRING if it is not set. */
|
||||
wolfSSL_ASN1_STRING_free(ne->value);
|
||||
ne->value = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return ne;
|
||||
|
Reference in New Issue
Block a user