netdev-dpdk: Fix mp_name leak on snprintf failure.
CC: Robert Wojciechowicz
CC: Antonio Fischetti
Fixes: ("netdev-dpdk: Create separate memory pool for each port.")
Fixes: ("netdev-dpdk: manage failure in mempool name creation.")
@@ -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;
