From: Noel Power Date: Wed, 20 Apr 2016 10:46:24 +0000 (+0100) Subject: s4:torture:libnet: fix 'Conditional jump or move' valgrind error X-Git-Tag: talloc-2.1.7~148 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0ae25fff0aa941d3300d733d26c9f2697bc55ed2;p=thirdparty%2Fsamba.git s4:torture:libnet: fix 'Conditional jump or move' valgrind error smbtorture test net.domopen.domopen generated the following valgrind trace. ==29054== Conditional jump or move depends on uninitialised value(s) ==29054== at 0x9788D31: libnet_DomainOpen_send (libnet_domain.c:617) ==29054== by 0x9788E01: libnet_DomainOpen (libnet_domain.c:676) ==29054== by 0x595F5D: test_domainopen (domain.c:41) ==29054== by 0x5961AD: torture_domainopen (domain.c:101) ==29054== by 0x9553F62: wrap_simple_test (torture.c:632) ==29054== by 0x955368F: internal_torture_run_test (torture.c:442) ==29054== by 0x9553A6B: torture_run_test_restricted (torture.c:542) ==29054== by 0x26013F: run_matching (smbtorture.c:110) ==29054== by 0x260001: run_matching (smbtorture.c:95) ==29054== by 0x260260: torture_run_named_tests (smbtorture.c:143) ==29054== by 0x261EDF: main (smbtorture.c:665) ==29054== ==29054== Conditional jump or move depends on uninitialised value(s) ==29054== at 0x9788D95: libnet_DomainOpen_recv (libnet_domain.c:648) ==29054== by 0x9788E1D: libnet_DomainOpen (libnet_domain.c:677) ==29054== by 0x595F5D: test_domainopen (domain.c:41) ==29054== by 0x5961AD: torture_domainopen (domain.c:101) ==29054== by 0x9553F62: wrap_simple_test (torture.c:632) ==29054== by 0x955368F: internal_torture_run_test (torture.c:442) ==29054== by 0x9553A6B: torture_run_test_restricted (torture.c:542) ==29054== by 0x26013F: run_matching (smbtorture.c:110) ==29054== by 0x260001: run_matching (smbtorture.c:95) ==29054== by 0x260260: torture_run_named_tests (smbtorture.c:143) Signed-off-by: Noel Power Reviewed-by: Volker Lendecke Reviewed-by: Andreas Schneider --- diff --git a/source4/torture/libnet/domain.c b/source4/torture/libnet/domain.c index 71753de826d..c1cfc919d00 100644 --- a/source4/torture/libnet/domain.c +++ b/source4/torture/libnet/domain.c @@ -33,6 +33,8 @@ static bool test_domainopen(struct torture_context *tctx, NTSTATUS status; struct libnet_DomainOpen io; + ZERO_STRUCT(io); + torture_comment(tctx, "opening domain\n"); io.in.domain_name = talloc_strdup(mem_ctx, domname->string);