torture: Don't segfault in smb2.session on error.
authorAndreas Schneider <asn@samba.org>
Mon, 1 Jul 2013 11:02:44 +0000 (13:02 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 2 Jul 2013 19:30:43 +0000 (12:30 -0700)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/torture/smb2/session.c

index 9592b5ef8dcf4d30fcb390c8217a8a644dceec7c..6901f47300e369bdc0bffddec48909b02ffec2c8 100644 (file)
@@ -863,7 +863,7 @@ static bool test_session_expire1(struct torture_context *tctx)
        const char *host = torture_setting_string(tctx, "host", NULL);
        const char *share = torture_setting_string(tctx, "share", NULL);
        struct cli_credentials *credentials = cmdline_credentials;
-       struct smb2_tree *tree;
+       struct smb2_tree *tree = NULL;
        enum credentials_use_kerberos use_kerberos;
        char fname[256];
        struct smb2_handle _h1;