From 064ff151504453220ae377f6092cd706d2e317e2 Mon Sep 17 00:00:00 2001 From: Benoît Ganne Date: Thu, 26 Jan 2023 16:04:43 +0100 Subject: lb: keep AddressSanitizer happy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit vec_alloc() does not mark vector as accessible contrary to vec_validate(). Also removes redundant memset(0) as vector allocation always zeroed new memory. Type: fix Change-Id: I8309831b964a618454ed0bebbcdec7ec21149414 Signed-off-by: Benoît Ganne --- src/plugins/lb/lb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/lb/lb.c') diff --git a/src/plugins/lb/lb.c b/src/plugins/lb/lb.c index 782833495c1..c6f5a0ab89a 100644 --- a/src/plugins/lb/lb.c +++ b/src/plugins/lb/lb.c @@ -486,7 +486,7 @@ out: } //First, let's sort the ASs - vec_alloc(sort_arr, pool_elts(vip->as_indexes)); + vec_validate (sort_arr, pool_elts (vip->as_indexes) - 1); i = 0; pool_foreach (as_index, vip->as_indexes) { -- cgit 1.2.3-korg