ping: fix incorrect index while clearing ping
Type: fix
Signed-off-by: Vyshakh Krishnan <vyshakh@rtbrick.com>
Change-Id: I0b085fd2d3d9b8e08a16585c4964101b6461bf06
diff --git a/src/plugins/ping/ping.c b/src/plugins/ping/ping.c
index 38cb5b8..06cf7dd 100644
--- a/src/plugins/ping/ping.c
+++ b/src/plugins/ping/ping.c
@@ -156,7 +156,7 @@
{
if (pr->icmp_id == icmp_id)
{
- vec_del1 (pm->active_ping_runs, pm->active_ping_runs - pr);
+ vec_del1 (pm->active_ping_runs, pr - pm->active_ping_runs);
break;
}
}