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