summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorRemy Horton <remy.horton@intel.com>2016-06-20 16:23:07 +0100
committerThomas Monjalon <thomas.monjalon@6wind.com>2016-06-21 15:56:39 +0200
commit9f2bb5ce8a275d84146a42d13c981b2ea5e39222 (patch)
tree3b4a575cc5a7de71ebbeffd52b458aecae46da7c /examples
parent21b5bd0d66cfc05e70463fdbe6dc00404860ca34 (diff)
downloaddpdk-9f2bb5ce8a275d84146a42d13c981b2ea5e39222.zip
dpdk-9f2bb5ce8a275d84146a42d13c981b2ea5e39222.tar.gz
dpdk-9f2bb5ce8a275d84146a42d13c981b2ea5e39222.tar.xz
examples/l2fwd-keepalive: fix memory leak
Fixes memory leaks detected by Coverity. These are due to ephemeral memory allocations not being freed when errors occur. Coverity issue: 127349 Fixes: e2aae1c1ced9 ("ethdev: remove name from extended statistic fetch") Signed-off-by: Remy Horton <remy.horton@intel.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/l2fwd-keepalive/shm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/l2fwd-keepalive/shm.c b/examples/l2fwd-keepalive/shm.c
index 66fc433..177aa5b 100644
--- a/examples/l2fwd-keepalive/shm.c
+++ b/examples/l2fwd-keepalive/shm.c
@@ -80,6 +80,8 @@ struct rte_keepalive_shm *rte_keepalive_shm_create(void)
RTE_LOG(INFO, EAL,
"Failed to setup SHM semaphore (%s)\n",
strerror(errno));
+ munmap(ka_shm,
+ sizeof(struct rte_keepalive_shm));
return NULL;
}