summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/torture/smb2/notify.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/torture/smb2/notify.c b/source4/torture/smb2/notify.c
index 4509be6a2c..b68ad55e96 100644
--- a/source4/torture/smb2/notify.c
+++ b/source4/torture/smb2/notify.c
@@ -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;