diff options
author | Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> | 2010-03-22 18:22:55 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-22 18:22:55 +0100 |
commit | 7c3456fdb503071787f7f972de1069b9cacd16f0 (patch) | |
tree | da16113774cd3f0c1bb2fe9e97b1854d5c1662b5 /net/rxrpc/ar-accept.c | |
parent | ip_gre: include route header_len in max_headroom calculation (diff) | |
download | linux-7c3456fdb503071787f7f972de1069b9cacd16f0.tar.xz linux-7c3456fdb503071787f7f972de1069b9cacd16f0.zip |
rxrpc: Check allocation failure.
alloc_skb() can return NULL.
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | net/rxrpc/ar-accept.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/rxrpc/ar-accept.c b/net/rxrpc/ar-accept.c index 77228f28fa36..2d744f22a9a1 100644 --- 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; } |