From: Jeremy Allison Date: Fri, 30 Jun 2017 18:34:13 +0000 (-0700) Subject: s3: smbd: Add missing out of memory check. X-Git-Tag: tdb-1.3.14~8 X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=f2588ed689b813d10034c117b02a3399df63ad4f;p=samba.git s3: smbd: Add missing out of memory check. Signed-off-by: Jeremy Allison Reviewed-by: Richard Sharpe --- 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;