bareos: master 874bfec6

Author Committer Branch Timestamp Parent
stephand pstorz master 2021-04-12 22:33 master 8e7d6245 Pending
Changeset gfapi-fd: Fix possible crash on second glfs_close()

Under rare circumstances, namely when a file was deleted during
backup after the glfs_open() and before the first glfs_close() call,
which then returns an error, the code assumed that the file was
closed and invoked a second glfs_close() call. This second call
could cause a segmentation fault.

The changed code no longer does a second glfs_close() call, the
first call already cleans up the glfs file descriptor properly,
even when an error occurs while trying to close the file.
mod - core/src/plugins/filed/gfapi/gfapi-fd.cc Diff File