Skip to content
Commit 283960be authored by shridhar kalavagunta's avatar shridhar kalavagunta Committed by Tomas Mraz
Browse files

RAND_write_file(): Avoid potential file descriptor leak



If fdopen() call fails we need to close the fd. Also
return early as this is most likely some fatal error.

Fixes #25064

Reviewed-by: default avatarTom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: default avatarTomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25081)

(cherry picked from commit d6048344)
parent 4cf3cbe5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment