[1/7] pipeline: fix memory leak issue

Message ID 20201006203755.90779-1-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: 362741

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

Comments

David Marchand Oct. 8, 2020, 1:07 p.m. UTC | #1
On Tue, Oct 6, 2020 at 10:38 PM Cristian Dumitrescu
<cristian.dumitrescu@intel.com> wrote:
>
> Fixes: b32c0a2c5e ("pipeline: add SWX table update high level API")
> Coverity issue: 362741
>
> Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>

Series applied.
  

Patch

diff --git a/lib/librte_pipeline/rte_swx_ctl.c b/lib/librte_pipeline/rte_swx_ctl.c
index 576fb2bf3..9d986a83e 100644
--- a/lib/librte_pipeline/rte_swx_ctl.c
+++ b/lib/librte_pipeline/rte_swx_ctl.c
@@ -1463,6 +1463,7 @@  rte_swx_ctl_pipeline_table_entry_read(struct rte_swx_ctl_pipeline *ctl,
 		arg_offset += arg->n_bits / 8;
 	}
 
+	free(s0);
 	return entry;
 
 error: