mirror of https://github.com/openssl/openssl.git
test/timing_load_creds.c: Add fclose() if error occurs
Add fclose() if error occurs to release fp.
Fixes: 6212fc6814
("Add a stand-alone "timing" program")
Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/28007)
This commit is contained in:
parent
c64b6af5e2
commit
d3e781b764
|
@ -150,6 +150,7 @@ int main(int ac, char **av)
|
|||
}
|
||||
fp = fopen(av[0], "r");
|
||||
if ((long)fread(contents, 1, sb.st_size, fp) != sb.st_size) {
|
||||
fclose(fp);
|
||||
OPENSSL_free(contents);
|
||||
perror("fread");
|
||||
exit(EXIT_FAILURE);
|
||||
|
|
Loading…
Reference in New Issue