summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-08-12 15:19:17 +0200
committerMichael Adam <obnox@samba.org>2008-08-12 21:37:37 +0200
commit743d6f707a7dcd31f8d0cf1685275d179c0d5169 (patch)
tree1fffd3bc96b9e988785271dff2a5f019b5ceab96 /source3/smbd
parentac9f55b9102574085ae6c7364c794a386d4981a1 (diff)
downloadsamba-743d6f707a7dcd31f8d0cf1685275d179c0d5169.tar.gz
samba-743d6f707a7dcd31f8d0cf1685275d179c0d5169.tar.bz2
samba-743d6f707a7dcd31f8d0cf1685275d179c0d5169.zip
Make sure to always set errno on error path in OpenDir (and hence scan_directory).
Michael (This used to be commit 15fc2427f91da697e0e91f7f34b0f0c6e230a9a5)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/dir.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c
index 74cd63ddda..c2735c032a 100644
--- a/source3/smbd/dir.c
+++ b/source3/smbd/dir.c
@@ -1084,6 +1084,7 @@ struct smb_Dir *OpenDir(TALLOC_CTX *mem_ctx, connection_struct *conn,
dirp->dir_path = talloc_strdup(dirp, name);
if (!dirp->dir_path) {
+ errno = ENOMEM;
goto fail;
}