diff options
author | Tim Prouty <tprouty@samba.org> | 2009-05-04 13:26:02 -0700 |
---|---|---|
committer | Tim Prouty <tprouty@samba.org> | 2009-05-04 13:26:27 -0700 |
commit | 1b223eeb5950c10e90d9672315635c5b171b3d9e (patch) | |
tree | 319473d0db7ac0d070201633a4c818719c8873f0 | |
parent | 651fb412a8092a93348621605b8d26396e061350 (diff) | |
download | samba-1b223eeb5950c10e90d9672315635c5b171b3d9e.tar.gz samba-1b223eeb5950c10e90d9672315635c5b171b3d9e.tar.bz2 samba-1b223eeb5950c10e90d9672315635c5b171b3d9e.zip |
s3 torture: Only close if open was successful
-rw-r--r-- | source3/torture/denytest.c | 16 |
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++) { |