summaryrefslogtreecommitdiff
path: root/source4/torture/basic/disconnect.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture/basic/disconnect.c')
-rw-r--r--source4/torture/basic/disconnect.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/source4/torture/basic/disconnect.c b/source4/torture/basic/disconnect.c
index 71471c7f0a..17fbc61d2f 100644
--- a/source4/torture/basic/disconnect.c
+++ b/source4/torture/basic/disconnect.c
@@ -43,8 +43,8 @@
static bool test_disconnect_open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
{
union smb_open io;
- NTSTATUS status;
struct smbcli_request *req1, *req2;
+ NTSTATUS status;
printf("trying open/disconnect\n");
@@ -66,6 +66,11 @@ static bool test_disconnect_open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
io.ntcreatex.in.share_access = 0;
req1 = smb_raw_open_send(cli->tree, &io);
req2 = smb_raw_open_send(cli->tree, &io);
+ if (!req1 || !req2) {
+ printf("test_disconnect_open: smb_raw_open_send() "
+ "returned NULL\n");
+ return false;
+ }
status = smbcli_chkpath(cli->tree, "\\");
CHECK_STATUS(status, NT_STATUS_OK);
@@ -113,6 +118,11 @@ static bool test_disconnect_lock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
lock[0].pid = 2;
io.lockx.in.timeout = 3000;
req = smb_raw_lock_send(cli->tree, &io);
+ if (!req) {
+ printf("test_disconnect_lock: smb_raw_lock_send() "
+ "returned NULL\n");
+ return false;
+ }
status = smbcli_chkpath(cli->tree, "\\");
CHECK_STATUS(status, NT_STATUS_OK);