Commit 8cf800da authored by Xinghai Cen's avatar Xinghai Cen
Browse files

RDMA/hns: Fix unmatched kmalloc and kvfree

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IBQK42



----------------------------------------------------------------------

page is allocated with kmalloc(), and should be freed with kfree().

Fixes: 431c875e ("RDMA/hns: Fix simultaneous reset and resource deregistration")
Signed-off-by: default avatarXinghai Cen <cenxinghai@h-partners.com>
parent f81404c8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ int hns_roce_db_map_user(struct hns_roce_ucontext *context, unsigned long virt,
err_dbnode:
	kvfree(page->db_node);
err_page:
	kvfree(page);
	kfree(page);
err_out:
	mutex_unlock(&context->page_mutex);