Skip to content

Commit d755130

Browse files
committed
openssl: Fix stack leak in php_openssl_load_all_certs_from_file()
The previous code only freed the stack but not its contents. As reported by 4b9e80e#r179336568
1 parent 284fd77 commit d755130

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ext/openssl/openssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2330,7 +2330,7 @@ static STACK_OF(X509) *php_openssl_load_all_certs_from_file(
23302330
ret = stack;
23312331
end:
23322332
BIO_free(in);
2333-
sk_X509_INFO_free(sk);
2333+
sk_X509_INFO_pop_free(sk, X509_INFO_free);
23342334

23352335
return ret;
23362336
}

0 commit comments

Comments
 (0)