]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
fsx: fix leaked log file pointer
authorDarrick J. Wong <djwong@kernel.org>
Mon, 3 Feb 2025 22:00:31 +0000 (14:00 -0800)
committerZorro Lang <zlang@kernel.org>
Tue, 18 Feb 2025 04:42:39 +0000 (12:42 +0800)
commite8e29e028faa7580bbaa5c3015114953681b3886
tree3adf18310d9c094317e16bf4248a46f35caee836
parenta8268531ca8bc2a1d51ef499cb123a57d40c34ae
fsx: fix leaked log file pointer

Fix a resource leaks in fsx, where we fail to close the fsx logfile,
because the C library could have some buffered contents that aren't
flushed when the program terminates.  glibc seems to do this for us, but
I wouldn't be so sure about the others.

Fixes: 3f742550dfed84 ("fsx: add support for recording operations to a file")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
ltp/fsx.c