git.samba.org
/
obnox
/
samba
/
samba-obnox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6385f75
)
s4:torture:smb2: fix segfault on error condition in the durable-open.reopen2a test
author
Michael Adam
<obnox@samba.org>
Wed, 13 Feb 2013 14:00:26 +0000
(15:00 +0100)
committer
Stefan Metzmacher
<metze@samba.org>
Mon, 18 Feb 2013 14:55:18 +0000
(15:55 +0100)
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source4/torture/smb2/durable_open.c
patch
|
blob
|
history
diff --git
a/source4/torture/smb2/durable_open.c
b/source4/torture/smb2/durable_open.c
index c783fc310c27aed46c2828b4d31c82137f025b48..ec63c5c3ce88683a9dd34477b2abef2e6264ec34 100644
(file)
--- a/
source4/torture/smb2/durable_open.c
+++ b/
source4/torture/smb2/durable_open.c
@@
-541,13
+541,15
@@
static bool test_durable_open_reopen2a(struct torture_context *tctx,
h = &_h;
done:
- if (h != NULL) {
- smb2_util_close(tree, *h);
- }
+ if (tree != NULL) {
+ if (h != NULL) {
+ smb2_util_close(tree, *h);
+ }
- smb2_util_unlink(tree, fname);
+
smb2_util_unlink(tree, fname);
- talloc_free(tree);
+ talloc_free(tree);
+ }
talloc_free(mem_ctx);