提交 b791355b 编写于 作者: A Andy Polyakov

rand/randfile.c: fix potential resource leak in RAND_load_file.

Found by Coverity.
Reviewed-by: NRichard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5834)
上级 6228b1da
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册