lb: fix using vip after free

fix use of vip after it was deleted

Type: fix
Fixes: 041eacc81656d2ed5bc01b96b15a7d03a1700f13
Change-Id: I5723485c5da7507fbc6c86ff6eb9f77127439f67
Signed-off-by: Georgy Borodin <bor1-go@yandex-team.ru>
This commit is contained in:
Georgy Borodin
2023-10-26 01:44:12 +02:00
committed by Dave Wallace
parent b3c863eae4
commit f46c5525d2

View File

@ -373,9 +373,9 @@ void lb_garbage_collection()
}
vec_foreach(i, to_be_removed_vips) {
vip = &lbm->vips[*i];
pool_put(lbm->vips, vip);
pool_free(vip->as_indexes);
vip = &lbm->vips[*i];
pool_free (vip->as_indexes);
pool_put (lbm->vips, vip);
}
vec_free(to_be_removed_vips);