summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2019-07-12 11:27:28 +0200
committerFlorin Coras <florin.coras@gmail.com>2019-07-12 16:17:09 +0000
commit2f7364a9adc99bf077d3004a696742a7e3cffff4 (patch)
treed80deade41eb41b5b12130416e44bee03c3274a1
parent401aedfb032d69daa876544e8e0a2973d69c50ac (diff)
vcl: fix tsock 0-ing in test client
Type: fix Fixes: d48e9763bfc39106eca954a28223b72261bf1aeb Change-Id: I9af222f4083a82592058fd42950db1c97caf647e Signed-off-by: Benoît Ganne <bganne@cisco.com>
-rw-r--r--src/plugins/hs_apps/vcl/sock_test_client.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/hs_apps/vcl/sock_test_client.c b/src/plugins/hs_apps/vcl/sock_test_client.c
index 569fd0759e1..13227f28265 100644
--- a/src/plugins/hs_apps/vcl/sock_test_client.c
+++ b/src/plugins/hs_apps/vcl/sock_test_client.c
@@ -620,8 +620,9 @@ sock_test_connect_test_sockets (uint32_t num_test_sockets)
return -1;
}
- if (!scm->test_socket)
- memset (tsock, 0, sizeof (*tsock));
+ memset (&tsock[scm->num_test_sockets], 0,
+ sizeof (vcl_test_session_t) * (num_test_sockets -
+ scm->num_test_sockets));
scm->test_socket = tsock;
for (i = scm->num_test_sockets; i < num_test_sockets; i++)