From 15fc2427f91da697e0e91f7f34b0f0c6e230a9a5 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 12 Aug 2008 15:19:17 +0200 Subject: [PATCH] Make sure to always set errno on error path in OpenDir (and hence scan_directory). Michael --- source/smbd/dir.c | 1 + 1 file changed, 1 insertion(+) 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; } -- 2.47.3