Free up BIO properly when using streaming S/MIME sign.
This commit is contained in:
parent
34be34fdd0
commit
beedea2fef
@ -239,14 +239,13 @@ static int pkcs7_output_data(BIO *out, BIO *data, PKCS7 *p7, int flags)
|
|||||||
/* Finalize signatures */
|
/* Finalize signatures */
|
||||||
PKCS7_dataFinal(p7, p7bio);
|
PKCS7_dataFinal(p7, p7bio);
|
||||||
|
|
||||||
/* Now remove any digests from output BIO */
|
/* Now remove any digests prepended to the BIO */
|
||||||
|
|
||||||
while (1)
|
while (p7bio != out)
|
||||||
{
|
{
|
||||||
tmpbio = BIO_pop(p7bio);
|
tmpbio = BIO_pop(p7bio);
|
||||||
if (tmpbio == out)
|
BIO_free(p7bio);
|
||||||
break;
|
p7bio = tmpbio;
|
||||||
BIO_free(tmpbio);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user