git.samba.org
/
sfrench
/
cifs-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
RDMA/cma: Fix rdma_resolve_route() memory leak
[sfrench/cifs-2.6.git]
/
drivers
/
infiniband
/
core
/
cma.c
diff --git
a/drivers/infiniband/core/cma.c
b/drivers/infiniband/core/cma.c
index 9dfb07a16ab189e654c48f166d3b32555d79ae9e..420de383c03991f0831261c764c883047e1d3dc6 100644
(file)
--- a/
drivers/infiniband/core/cma.c
+++ b/
drivers/infiniband/core/cma.c
@@
-2814,7
+2814,8
@@
static int cma_resolve_ib_route(struct rdma_id_private *id_priv,
cma_init_resolve_route_work(work, id_priv);
- route->path_rec = kmalloc(sizeof *route->path_rec, GFP_KERNEL);
+ if (!route->path_rec)
+ route->path_rec = kmalloc(sizeof *route->path_rec, GFP_KERNEL);
if (!route->path_rec) {
ret = -ENOMEM;
goto err1;