[5/7] pipeline: fix resource leak issue

Message ID 20201006203755.90779-5-cristian.dumitrescu@intel.com (mailing list archive)
State Accepted, archived
Delegated to: David Marchand
Headers
Series [1/7] pipeline: fix memory leak issue |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Cristian Dumitrescu Oct. 6, 2020, 8:37 p.m. UTC
  Fixes: b32c0a2c5e ("pipeline: add SWX table update high level API")
Coverity issue: 362812

Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 lib/librte_pipeline/rte_swx_ctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/lib/librte_pipeline/rte_swx_ctl.c b/lib/librte_pipeline/rte_swx_ctl.c
index 9d986a83e..ee6df4544 100644
--- a/lib/librte_pipeline/rte_swx_ctl.c
+++ b/lib/librte_pipeline/rte_swx_ctl.c
@@ -371,7 +371,7 @@  table_entry_duplicate(struct rte_swx_ctl_pipeline *ctl,
 		}
 	}
 
-	return entry;
+	return new_entry;
 
 error:
 	table_entry_free(new_entry);