CHECK_VAL(io2.out.oplock_level, smb2_util_oplock_level("b"));
done:
- if (h != NULL) {
- smb2_util_close(tree2, *h);
- }
+ if (tree != NULL) {
+ if (h != NULL) {
+ smb2_util_close(tree2, *h);
+ }
- smb2_util_unlink(tree2, fname);
+ smb2_util_unlink(tree2, fname);
- talloc_free(tree);
+ talloc_free(tree);
+ }
talloc_free(mem_ctx);