]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
CVE-2017-2619: s3: smbd: OpenDir_fsp() - Fix memory leak on error.
authorJeremy Allison <jra@samba.org>
Mon, 19 Dec 2016 20:15:59 +0000 (12:15 -0800)
committerKarolin Seeger <kseeger@samba.org>
Wed, 22 Mar 2017 09:45:16 +0000 (10:45 +0100)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12496

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
source3/smbd/dir.c

index ea4f1ab6c4471bed5051fb53cf27be6b9ca702be..b8034be1557580f755fd1bbf6d4799fbe5dbc8ac 100644 (file)
@@ -1742,7 +1742,7 @@ static struct smb_Dir *OpenDir_fsp(TALLOC_CTX *mem_ctx, connection_struct *conn,
                        dirp->dir_path,
                        strerror(errno)));
                if (errno != ENOSYS) {
-                       return NULL;
+                       goto fail;
                }
        }