2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-30 13:58:14 +00:00

netdev-dpdk: Fix mp_name leak on snprintf failure.

CC: Robert Wojciechowicz <robertx.wojciechowicz@intel.com>
CC: Antonio Fischetti <antonio.fischetti@intel.com>
Fixes: d555d9bded ("netdev-dpdk: Create separate memory pool for each port.")
Fixes: 65056fd796 ("netdev-dpdk: manage failure in mempool name creation.")
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
Ilya Maximets
2017-10-30 15:52:38 +03:00
committed by Ben Pfaff
parent fa90cc39d6
commit ec6edc8cde

View File

@@ -505,6 +505,7 @@ dpdk_mp_name(struct dpdk_mp *dmp)
VLOG_DBG("snprintf returned %d. Failed to generate a mempool " VLOG_DBG("snprintf returned %d. Failed to generate a mempool "
"name for \"%s\". Hash:0x%x, mtu:%d, mbufs:%u.", "name for \"%s\". Hash:0x%x, mtu:%d, mbufs:%u.",
ret, dmp->if_name, h, dmp->mtu, dmp->n_mbufs); ret, dmp->if_name, h, dmp->mtu, dmp->n_mbufs);
free(mp_name);
return NULL; return NULL;
} }
return mp_name; return mp_name;