smbd: simplify error codepath in openat_pathref_fsp()
authorRalph Boehme <slow@samba.org>
Tue, 2 Feb 2021 12:49:56 +0000 (13:49 +0100)
committerRalph Boehme <slow@samba.org>
Fri, 5 Feb 2021 06:22:35 +0000 (06:22 +0000)
commitcd3d970c84b340630745bc555a86ac2d1306baac
tree5a388fe3b5a58dda1b414e183608c6835becb4d3
parent48bc561d1a8bb5ce99663b58a2e5e9aa344af96a
smbd: simplify error codepath in openat_pathref_fsp()

No change in behaviour: the cleanup code at the fail label does the same as the
cleanup this patch removes. It has an extra fd_close() that is not existing in
the removed cleanup, but as fsp->fd is -1, that's a noop.

And when previously the

return NT_STATUS_OBJECT_NAME_NOT_FOUND;

returns an an explicit status code, when now doing goto fail status will also be
set to NT_STATUS_OBJECT_NAME_NOT_FOUND.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/files.c