@@ -322,6 +322,8 @@ static odph_ethaddr_t dst_mac;
static uint32_t cpu_unique_id;
static uint32_t cpu_tcp_seq_num;
+static int destroy_tm_queues(tm_queue_desc_t *queue_desc);
+
static void busy_wait(uint64_t nanoseconds)
{
odp_time_t start_time, end_time;
@@ -1414,6 +1416,8 @@ static tm_node_desc_t *create_tm_node(odp_tm_t odp_tm,
rc = create_tm_queue(odp_tm, tm_node, node_idx, queue_desc,
priority);
if (rc != 0) {
+ destroy_tm_queues(queue_desc);
+ free(node_desc);
LOG_ERR("create_tm_queue() failed @ level=%u\n",
level);
return NULL;
Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> --- test/validation/traffic_mngr/traffic_mngr.c | 4 ++++ 1 file changed, 4 insertions(+)