projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
i40iw: Do not set self-referencing pointer to NULL after kfree
[cascardo/linux.git]
/
drivers
/
infiniband
/
hw
/
i40iw
/
i40iw_utils.c
diff --git
a/drivers/infiniband/hw/i40iw/i40iw_utils.c
b/drivers/infiniband/hw/i40iw/i40iw_utils.c
index
0e8db0a
..
6fd043b
100644
(file)
--- a/
drivers/infiniband/hw/i40iw/i40iw_utils.c
+++ b/
drivers/infiniband/hw/i40iw/i40iw_utils.c
@@
-673,8
+673,11
@@
enum i40iw_status_code i40iw_free_virt_mem(struct i40iw_hw *hw,
{
if (!mem)
return I40IW_ERR_PARAM;
+ /*
+ * mem->va points to the parent of mem, so both mem and mem->va
+ * can not be touched once mem->va is freed
+ */
kfree(mem->va);
- mem->va = NULL;
return 0;
}