diff options
Diffstat (limited to 'source3/smbwrapper/smbw.c')
-rw-r--r-- | source3/smbwrapper/smbw.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/source3/smbwrapper/smbw.c b/source3/smbwrapper/smbw.c index 97beca9b19..33cadc48d9 100644 --- a/source3/smbwrapper/smbw.c +++ b/source3/smbwrapper/smbw.c @@ -531,13 +531,10 @@ int smbw_open(const char *fname, int flags, mode_t mode) /* it might be a directory. Maybe we should use chkpath? */ eno = smbw_error(&srv->cli); fd = smbw_dir_open(fname); + if (fd == -1) errno = eno; smbw_busy--; return fd; } - if (fd == -1) { - errno = eno; - goto failed; - } file = (struct smbw_file *)malloc(sizeof(*file)); if (!file) { |