]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
script-playutils: close filestream in case ignore_line() fails
authorThomas Weißschuh <thomas@t-8ch.de>
Wed, 27 Sep 2023 21:30:27 +0000 (23:30 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 24 Nov 2023 09:54:19 +0000 (10:54 +0100)
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
term-utils/script-playutils.c

index cd598d2c6abe0a2b7b1f593ad69d30667a53b851..699865b7f10a2969e2f69ea9c20027efba75579d 100644 (file)
@@ -252,6 +252,8 @@ int replay_associate_log(struct replay_setup *stp,
 
        if (rc == 0)
                replay_new_log(stp, streams, filename, f);
+       else if (f)
+               fclose(f);
 
        DBG(LOG, ul_debug("associate log file '%s', streams '%s' [rc=%d]", filename, streams, rc));
        return rc;