mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 12:04:38 +08:00
rand/randfile.c: fix potential resource leak in RAND_load_file.
Found by Coverity. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5834)
This commit is contained in:
parent
6228b1dae2
commit
b791355b5c
@ -94,6 +94,7 @@ int RAND_load_file(const char *file, long bytes)
|
||||
if (fstat(fileno(in), &sb) < 0) {
|
||||
RANDerr(RAND_F_RAND_LOAD_FILE, RAND_R_INTERNAL_ERROR);
|
||||
ERR_add_error_data(2, "Filename=", file);
|
||||
fclose(in);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user