projects
/
profile
/
ivi
/
kernel-x86-ivi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a6f498a
)
SUNRPC: destroy freshly allocated transport in case of sockaddr init error
author
Stanislav Kinsbursky
<skinsbursky@parallels.com>
Thu, 10 Nov 2011 11:33:23 +0000
(14:33 +0300)
committer
Trond Myklebust
<Trond.Myklebust@netapp.com>
Thu, 10 Nov 2011 19:50:07 +0000
(14:50 -0500)
Otherwise we will leak xprt structure and struct net reference.
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
net/sunrpc/xprtsock.c
patch
|
blob
|
history
diff --git
a/net/sunrpc/xprtsock.c
b/net/sunrpc/xprtsock.c
index
d7f97ef
..
2d78d95
100644
(file)
--- a/
net/sunrpc/xprtsock.c
+++ b/
net/sunrpc/xprtsock.c
@@
-2530,8
+2530,10
@@
static struct rpc_xprt *xs_setup_xprt(struct xprt_create *args,
int err;
err = xs_init_anyaddr(args->dstaddr->sa_family,
(struct sockaddr *)&new->srcaddr);
- if (err != 0)
+ if (err != 0) {
+ xprt_free(xprt);
return ERR_PTR(err);
+ }
}
return xprt;