From 743d6f707a7dcd31f8d0cf1685275d179c0d5169 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 12 Aug 2008 15:19:17 +0200 Subject: Make sure to always set errno on error path in OpenDir (and hence scan_directory). Michael (This used to be commit 15fc2427f91da697e0e91f7f34b0f0c6e230a9a5) --- source3/smbd/dir.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/smbd/dir.c') 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; } -- cgit