vfs_shadow_copy2: Avoid closing snapsdir twice
commita6606369e2ce672b3d22b74cf26b606e0026af76
authorAnoop C S <anoopcs@samba.org>
Mon, 12 Oct 2020 11:25:40 +0000 (12 16:55 +0530)
committerKarolin Seeger <kseeger@samba.org>
Tue, 27 Oct 2020 08:22:01 +0000 (27 08:22 +0000)
treebbc03e59e9d0600e415f68dfa3840acc5b52764e
parenta9bf4f90260cbeb679849c12477b00fd5a606a86
vfs_shadow_copy2: Avoid closing snapsdir twice

As per man page for closedir(3):

. . .
The  closedir() function closes the directory stream associated with
dirp.  A successful call to closedir() also closes the underlying file
descriptor associated with dirp.
. . .

Therefore we don't have to attempt an additional close of file
descriptor after closedir().

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14530

Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Oct 14 10:08:24 UTC 2020 on sn-devel-184

(cherry picked from commit 74fbe0b987a0333cca28bb6a547e5b4b4f2e706d)
source3/modules/vfs_shadow_copy2.c