torture: fixed SMB2-LOCK valgrind error
authorAndrew Tridgell <tridge@samba.org>
Thu, 26 Nov 2009 06:03:20 +0000 (17:03 +1100)
committerAndrew Tridgell <tridge@samba.org>
Fri, 27 Nov 2009 05:05:05 +0000 (16:05 +1100)
source4/torture/smb2/lock.c

index 6bba7bd0e4787ae984e4bd13a197bcab366b5096..beff052a893025e7e3a0cc2a6d16fb08ac54e9e3 100644 (file)
@@ -530,7 +530,7 @@ static bool test_lock_auto_unlock(struct torture_context *torture,
        struct smb2_handle h;
        uint8_t buf[200];
        struct smb2_lock lck;
-       struct smb2_lock_element el[2];
+       struct smb2_lock_element el[1];
 
        ZERO_STRUCT(buf);
 
@@ -541,6 +541,7 @@ static bool test_lock_auto_unlock(struct torture_context *torture,
        CHECK_STATUS(status, NT_STATUS_OK);
 
        ZERO_STRUCT(lck);
+       ZERO_STRUCT(el[0]);
        lck.in.locks            = el;
        lck.in.lock_count       = 0x0001;
        lck.in.file.handle      = h;