提交 1cfafab9 编写于 作者: S Sathya Perla 提交者: David S. Miller

be2net: reset queue address after freeing

This will prevent double free in some cases where be_clear() is called
for cleanup when be_setup() fails half-way.
Signed-off-by: NSathya Perla <sathya.perla@emulex.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 0ae57bb3
......@@ -127,9 +127,11 @@ static inline bool be_is_mc(struct be_adapter *adapter) {
static void be_queue_free(struct be_adapter *adapter, struct be_queue_info *q)
{
struct be_dma_mem *mem = &q->dma_mem;
if (mem->va)
if (mem->va) {
dma_free_coherent(&adapter->pdev->dev, mem->size, mem->va,
mem->dma);
mem->va = NULL;
}
}
static int be_queue_alloc(struct be_adapter *adapter, struct be_queue_info *q,
......@@ -1660,7 +1662,7 @@ static int be_evt_queues_create(struct be_adapter *adapter)
if (rc)
return rc;
}
return rc;
return 0;
}
static void be_mcc_queues_destroy(struct be_adapter *adapter)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册