s3: smbd: Add missing out of memory check.
authorJeremy Allison <jra@samba.org>
Fri, 30 Jun 2017 18:34:13 +0000 (11:34 -0700)
committerJeremy Allison <jra@samba.org>
Sat, 1 Jul 2017 01:07:11 +0000 (03:07 +0200)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
source3/smbd/open.c

index d7f471e..e8464ed 100644 (file)
@@ -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;