diff options
author | Steve French <sfrench@us.ibm.com> | 2009-04-30 15:36:52 +0000 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2009-04-30 15:36:52 +0000 |
commit | 912bc6ae3de99c7bada4577d4341ace4ee59b5be (patch) | |
tree | 28fd1a4bb9e4b05aa833285b46df169f12c0e24d /net/netrom/af_netrom.c | |
parent | d37dc42ab6f040b8f0f2962ab219c5b2accf748d (diff) | |
parent | 091438dd5668396328a3419abcbc6591159eb8d1 (diff) |
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'net/netrom/af_netrom.c')
-rw-r--r-- | net/netrom/af_netrom.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c index 4e705f87969f..3be0e016ab7d 100644 --- a/net/netrom/af_netrom.c +++ b/net/netrom/af_netrom.c @@ -1084,8 +1084,10 @@ static int nr_sendmsg(struct kiocb *iocb, struct socket *sock, /* Build a packet - the conventional user limit is 236 bytes. We can do ludicrously large NetROM frames but must not overflow */ - if (len > 65536) - return -EMSGSIZE; + if (len > 65536) { + err = -EMSGSIZE; + goto out; + } SOCK_DEBUG(sk, "NET/ROM: sendto: building packet.\n"); size = len + NR_NETWORK_LEN + NR_TRANSPORT_LEN; |