pipeline: fix resource leak
authorCristian Dumitrescu <cristian.dumitrescu@intel.com>
Tue, 6 Oct 2020 20:37:53 +0000 (21:37 +0100)
committerDavid Marchand <david.marchand@redhat.com>
Thu, 8 Oct 2020 13:01:07 +0000 (15:01 +0200)
Coverity issue: 362812
Fixes: b32c0a2c5e ("pipeline: add SWX table update high level API")

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
lib/librte_pipeline/rte_swx_ctl.c

index 9d986a8..ee6df45 100644 (file)
@@ -371,7 +371,7 @@ table_entry_duplicate(struct rte_swx_ctl_pipeline *ctl,
                }
        }
 
-       return entry;
+       return new_entry;
 
 error:
        table_entry_free(new_entry);