scriptreplay: fix error path

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2019-06-20 12:00:07 +02:00
parent 41ce6545d2
commit 4f4bac42d8
1 changed files with 1 additions and 1 deletions

View File

@ -149,7 +149,7 @@ static int replay_set_timing_file(struct replay_setup *stp, const char *filename
rc = -errno;
}
if (rc) {
if (rc && stp->timing_fp) {
fclose(stp->timing_fp);
stp->timing_fp = NULL;
}