diff options
-rw-r--r-- | src/vnet/pg/pg.h | 4 | ||||
-rw-r--r-- | src/vnet/pg/stream.c | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/vnet/pg/pg.h b/src/vnet/pg/pg.h index 0e4b2868b6c..5e99d9af9f6 100644 --- a/src/vnet/pg/pg.h +++ b/src/vnet/pg/pg.h @@ -184,7 +184,11 @@ typedef struct pg_stream_t always_inline void pg_buffer_index_free (pg_buffer_index_t * bi) { + vlib_main_t *vm = vlib_get_main (); + word n_alloc; vec_free (bi->edits); + n_alloc = clib_fifo_elts (bi->buffer_fifo); + vlib_buffer_free (vm, bi->buffer_fifo, n_alloc); clib_fifo_free (bi->buffer_fifo); } diff --git a/src/vnet/pg/stream.c b/src/vnet/pg/stream.c index 6376e9b7ce3..440e285031a 100644 --- a/src/vnet/pg/stream.c +++ b/src/vnet/pg/stream.c @@ -615,18 +615,12 @@ void pg_stream_del (pg_main_t * pg, uword index) { pg_stream_t *s; - pg_buffer_index_t *bi; s = pool_elt_at_index (pg->streams, index); pg_stream_enable_disable (pg, s, /* want_enabled */ 0); hash_unset_mem (pg->stream_index_by_name, s->name); - vec_foreach (bi, s->buffer_indices) - { - clib_fifo_free (bi->buffer_fifo); - } - pg_stream_free (s); pool_put (pg->streams, s); } |