summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorTim Prouty <tprouty@samba.org>2009-05-04 13:26:02 -0700
committerTim Prouty <tprouty@samba.org>2009-05-04 13:26:27 -0700
commit1b223eeb5950c10e90d9672315635c5b171b3d9e (patch)
tree319473d0db7ac0d070201633a4c818719c8873f0 /source3
parent651fb412a8092a93348621605b8d26396e061350 (diff)
downloadsamba-1b223eeb5950c10e90d9672315635c5b171b3d9e.tar.gz
samba-1b223eeb5950c10e90d9672315635c5b171b3d9e.tar.bz2
samba-1b223eeb5950c10e90d9672315635c5b171b3d9e.zip
s3 torture: Only close if open was successful
Diffstat (limited to 'source3')
-rw-r--r--source3/torture/denytest.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/source3/torture/denytest.c b/source3/torture/denytest.c
index e5cd5a2ec2..66a1c9f935 100644
--- a/source3/torture/denytest.c
+++ b/source3/torture/denytest.c
@@ -1470,8 +1470,12 @@ bool torture_denytest1(int dummy)
resultstr(denytable1[i].result));
}
- cli_close(cli1, fnum1);
- cli_close(cli1, fnum2);
+ if (NT_STATUS_IS_OK(ret1)) {
+ cli_close(cli1, fnum1);
+ }
+ if (NT_STATUS_IS_OK(ret2)) {
+ cli_close(cli1, fnum2);
+ }
}
for (i=0;i<2;i++) {
@@ -1555,8 +1559,12 @@ bool torture_denytest2(int dummy)
resultstr(denytable2[i].result));
}
- cli_close(cli1, fnum1);
- cli_close(cli2, fnum2);
+ if (NT_STATUS_IS_OK(ret1)) {
+ cli_close(cli1, fnum1);
+ }
+ if (NT_STATUS_IS_OK(ret2)) {
+ cli_close(cli2, fnum2);
+ }
}
for (i=0;i<2;i++) {