From f2588ed689b813d10034c117b02a3399df63ad4f Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 30 Jun 2017 11:34:13 -0700 Subject: [PATCH] s3: smbd: Add missing out of memory check. Signed-off-by: Jeremy Allison Reviewed-by: Richard Sharpe --- source3/smbd/open.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source3/smbd/open.c b/source3/smbd/open.c index d7f471ed671..e8464ed83b2 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -582,6 +582,10 @@ static int non_widelink_open(struct connection_struct *conn, smb_fname->stream_name, &smb_fname->st, smb_fname->flags); + if (smb_fname_rel == NULL) { + saved_errno = ENOMEM; + goto out; + } flags |= O_NOFOLLOW; -- 2.11.4.GIT