summaryrefslogtreecommitdiff
path: root/source3/torture
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2004-01-06 08:25:03 +0000
committerAndrew Bartlett <abartlet@samba.org>2004-01-06 08:25:03 +0000
commitf4a17613110562e3102c10b0cd762ba59bb5c099 (patch)
tree98b5c2637af49589beeed3a22428c39e5d80e409 /source3/torture
parent7f87b207a72811b0d00945fadafc51559e561828 (diff)
downloadsamba-f4a17613110562e3102c10b0cd762ba59bb5c099.tar.gz
samba-f4a17613110562e3102c10b0cd762ba59bb5c099.tar.bz2
samba-f4a17613110562e3102c10b0cd762ba59bb5c099.zip
merge torture changes from Samba 3.0 -> HEAD
(This used to be commit 6e9c68217bec1e4138b5eb9a9ed85807b31bbdb8)
Diffstat (limited to 'source3/torture')
-rw-r--r--source3/torture/torture.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 2ffae74016..2e6bc49d55 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -2792,8 +2792,8 @@ static BOOL run_oplock3(int dummy)
*/
static BOOL run_deletetest(int dummy)
{
- struct cli_state *cli1;
- struct cli_state *cli2;
+ struct cli_state *cli1 = NULL;
+ struct cli_state *cli2 = NULL;
const char *fname = "\\delete.file";
int fnum1 = -1;
int fnum2 = -1;
@@ -3201,15 +3201,15 @@ static BOOL run_deletetest(int dummy)
* intialized, because these functions don't handle
* uninitialized connections. */
- cli_close(cli1, fnum1);
- cli_close(cli1, fnum2);
+ if (fnum1 != -1) cli_close(cli1, fnum1);
+ if (fnum2 != -1) cli_close(cli1, fnum2);
cli_setatr(cli1, fname, 0, 0);
cli_unlink(cli1, fname);
- if (!torture_close_connection(cli1)) {
+ if (cli1 && !torture_close_connection(cli1)) {
correct = False;
}
- if (!torture_close_connection(cli2)) {
+ if (cli2 && !torture_close_connection(cli2)) {
correct = False;
}
return correct;