From: Michael Adam Date: Tue, 12 Aug 2008 13:19:17 +0000 (+0200) Subject: Make sure to always set errno on error path in OpenDir (and hence scan_directory). X-Git-Tag: samba-3.3.0pre1~209 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=15fc2427f91da697e0e91f7f34b0f0c6e230a9a5;p=thirdparty%2Fsamba.git Make sure to always set errno on error path in OpenDir (and hence scan_directory). Michael --- diff --git a/source/smbd/dir.c b/source/smbd/dir.c index 74cd63ddda1..c2735c032a7 100644 --- a/source/smbd/dir.c +++ b/source/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; }