projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
99b437a
)
rxrpc: Check allocation failure.
author
Tetsuo Handa
<
[email protected]
>
Mon, 22 Mar 2010 13:50:19 +0000
(13:50 +0000)
committer
Linus Torvalds
<
[email protected]
>
Mon, 22 Mar 2010 16:57:19 +0000
(09:57 -0700)
alloc_skb() can return NULL.
Signed-off-by: Tetsuo Handa <
[email protected]
>
Signed-off-by: David Howells <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
net/rxrpc/ar-accept.c
patch
|
blob
|
history
diff --git
a/net/rxrpc/ar-accept.c
b/net/rxrpc/ar-accept.c
index 77228f28fa363240fce7da4e32d0b81bd8ea3951..2d744f22a9a1e0433363137c2aef908bf19f3508 100644
(file)
--- a/
net/rxrpc/ar-accept.c
+++ b/
net/rxrpc/ar-accept.c
@@
-88,6
+88,11
@@
static int rxrpc_accept_incoming_call(struct rxrpc_local *local,
/* get a notification message to send to the server app */
notification = alloc_skb(0, GFP_NOFS);
+ if (!notification) {
+ _debug("no memory");
+ ret = -ENOMEM;
+ goto error_nofree;
+ }
rxrpc_new_skb(notification);
notification->mark = RXRPC_SKB_MARK_NEW_CALL;
@@
-189,6
+194,7
@@
invalid_service:
ret = -ECONNREFUSED;
error:
rxrpc_free_skb(notification);
+error_nofree:
_leave(" = %d", ret);
return ret;
}