s4:torture:smb2: check for success of talloc in secondary_tcon()
authorMichael Adam <obnox@samba.org>
Thu, 2 Feb 2012 12:36:20 +0000 (13:36 +0100)
committerMichael Adam <obnox@samba.org>
Fri, 3 Feb 2012 10:10:29 +0000 (11:10 +0100)
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

source4/torture/smb2/notify.c

index 4509be6a2ce5b916bb865fc9f92005167d65ca32..b68ad55e967e4bcfc96af851bdf2f400e7e26aa1 100644 (file)
@@ -1804,6 +1804,10 @@ static struct smb2_tree *secondary_tcon(struct smb2_tree *tree,
        torture_comment(tctx,
                "create a second tree context on the same session\n");
        tree1 = smb2_tree_init(tree->session, tctx, false);
+       if (tree1 == NULL) {
+               torture_comment(tctx, "Out of memory\n");
+               return NULL;
+       }
 
        ZERO_STRUCT(tcon.smb2);
        tcon.generic.level = RAW_TCON_SMB2;