代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/gazelle 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 053024d4cbedc106276e25a7ace5d833f8a62dea Mon Sep 17 00:00:00 2001
From: compile_success <980965867@qq.com>
Date: Wed, 20 Dec 2023 01:37:12 +0000
Subject: [PATCH] fix alloc not free
---
src/lstack/core/lstack_cfg.c | 2 ++
src/lstack/core/lstack_dpdk.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/src/lstack/core/lstack_cfg.c b/src/lstack/core/lstack_cfg.c
index 6324c97..f639473 100644
--- a/src/lstack/core/lstack_cfg.c
+++ b/src/lstack/core/lstack_cfg.c
@@ -1185,11 +1185,13 @@ static int32_t parse_bond_slave_mac(void)
if (k >= GAZELLE_MAX_BOND_NUM) {
LSTACK_PRE_LOG(LSTACK_ERR, "cfg: too many slave mac address. The maximum number of mac address is %d.\n",
GAZELLE_MAX_BOND_NUM);
+ free(bond_slave_mac_tmp);
return -EINVAL;
}
ret = str_to_eth_addr(mac_addr, g_config_params.bond_slave_mac_addr[k].addr_bytes);
if (ret != 0) {
LSTACK_PRE_LOG(LSTACK_ERR, "cfg: invalid device name %s ret=%d.\n", mac_addr, ret);
+ free(bond_slave_mac_tmp);
return ret;
}
mac_addr = strtok_s(NULL, delim, &tmp);
diff --git a/src/lstack/core/lstack_dpdk.c b/src/lstack/core/lstack_dpdk.c
index e20dea8..6933ecd 100644
--- a/src/lstack/core/lstack_dpdk.c
+++ b/src/lstack/core/lstack_dpdk.c
@@ -553,11 +553,13 @@ int32_t dpdk_ethdev_init(int port_id, bool bond_port)
int slave_id = rte_eth_bond_primary_get(port_id);
if (slave_id < 0) {
LSTACK_LOG(ERR, LSTACK, "dpdk get bond primary port failed port = %d\n", slave_id);
+ free(eth_params);
return slave_id;
}
ret = rte_eth_dev_info_get(slave_id, &slave_dev_info);
if (ret != 0) {
LSTACK_LOG(ERR, LSTACK, "dpdk get bond dev info failed ret = %d\n", ret);
+ free(eth_params);
return ret;
}
dev_info.rx_offload_capa = slave_dev_info.rx_offload_capa;
--
2.27.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。