torture: NULL out after talloc_free
authorGarming Sam <garming@catalyst.net.nz>
Mon, 29 Dec 2014 20:36:37 +0000 (09:36 +1300)
committerJeremy Allison <jra@samba.org>
Tue, 30 Dec 2014 01:49:01 +0000 (02:49 +0100)
This appeared as a segmentation fault in rpc.spoolss.printer.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Dec 30 02:49:01 CET 2014 on sn-devel-104

lib/torture/torture.c

index ff2f8c89399affc20f1500e85e608649f1e7402a..78d8261d1a359f7ce7669ea8af8209f694451119 100644 (file)
@@ -460,6 +460,7 @@ static bool internal_torture_run_test(struct torture_context *context,
                               context->last_reason);
 
        talloc_free(context->last_reason);
+       context->last_reason = NULL;
 
        context->active_test = NULL;
        context->active_tcase = NULL;