Hello, On Tue, Sep 20, 2022 at 9:12 AM Suanming Mou <suanmi...@nvidia.com> wrote: > @@ -2873,17 +2907,23 @@ port_queue_action_handle_destroy(portid_t port_id, > * of error. > */ > memset(&error, 0x99, sizeof(error)); > + job = calloc(1, sizeof(*job)); > + if (!job) { > + printf("Queue action destroy job allocate > failed\n"); > + return -ENOMEM; > + } > + job->type = QUEUE_JOB_TYPE_ACTION_DESTROY; > + job->pia = pia; > > if (pia->handle && > rte_flow_async_action_handle_destroy(port_id, > - queue_id, &attr, pia->handle, NULL, &error)) { > + queue_id, &attr, pia->handle, job, &error)) { > ret = port_flow_complain(&error); > continue; > } > *tmp = pia->next; > printf("Indirect action #%u destruction queued\n", > pia->id); > - free(pia); > break; > } > if (i == n)
Our covscan tool reports a potential leak of "job" in this block. I am unclear whether it is a normal occurence, but it seems that if pia->handle == NULL, then job is leaked. Can you have a look and submit a fix if confirmed? Thanks. -- David Marchand