The lstab_read() function opens a file, but doesn't close it after use.

Signed-off-by: Miroslav Lichvar <mlich...@redhat.com>
---
 lstab.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lstab.c b/lstab.c
index e6e7ad2..0d6a427 100644
--- a/lstab.c
+++ b/lstab.c
@@ -144,6 +144,7 @@ static int lstab_read(struct lstab *lstab, const char *name)
                        index++;
                }
        }
+       fclose(fp);
        if (!lstab->expiration_utc) {
                fprintf(stderr, "missing expiration date in '%s'\n", name);
                return -1;
-- 
2.26.3



_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to