s4:torture: Fix talloc_array in test_EnumValue()
authorAndreas Schneider <asn@samba.org>
Fri, 25 Aug 2017 12:17:54 +0000 (14:17 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 25 Aug 2017 14:15:08 +0000 (16:15 +0200)
Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source4/torture/rpc/winreg.c

index 1a7b60f6493386e83e2ef37debfd9ac746a78588..9fc92cd7a2e91805af7829612f413572f73bf189 100644 (file)
@@ -1997,7 +1997,7 @@ static bool test_EnumValue(struct dcerpc_binding_handle *b,
 
                data = NULL;
                if (size) {
-                       data = (uint8_t *) talloc_array(tctx, uint8_t *, size);
+                       data = talloc_array(tctx, uint8_t, size);
                }
                r.in.value = data;