[dpdk-dev] app/testpmd: fix memory leak
diff mbox

Message ID 1485522948-210951-1-git-send-email-pablo.de.lara.guarch@intel.com
State Superseded, archived
Headers show

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel compilation success Compilation OK

Commit Message

Pablo de Lara Jan. 27, 2017, 1:15 p.m. UTC
Free memory when port flow entry creation fails.

Coverity issue: 139600
Fixes: 938a184a1870 ("app/testpmd: implement basic support for flow API")

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
 app/test-pmd/config.c | 2 ++
 1 file changed, 2 insertions(+)

Patch
diff mbox

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 5834498..5823100 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -954,6 +954,8 @@  port_flow_new(const struct rte_flow_attr *attr,
 		goto store;
 	}
 notsup:
+	if (pf)
+		free(pf);
 	rte_errno = err;
 	return NULL;
 }