vppinfra: free vector against its heap 92/36092/2
authorDamjan Marion <damarion@cisco.com>
Fri, 6 May 2022 10:37:30 +0000 (12:37 +0200)
committerBeno�t Ganne <bganne@cisco.com>
Fri, 6 May 2022 12:14:32 +0000 (12:14 +0000)
Type: fix
Change-Id: Ie292ee56dd5265a56ef472554aaf086e61da7089
Signed-off-by: Damjan Marion <damarion@cisco.com>
src/vppinfra/vec.h

index f45f45e..607fc28 100644 (file)
@@ -383,7 +383,7 @@ _vec_free (void **vp)
 {
   if (vp[0] == 0)
     return;
-  clib_mem_free (vec_header (vp[0]));
+  clib_mem_heap_free (vec_get_heap (vp[0]), vec_header (vp[0]));
   vp[0] = 0;
 }