aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ipv6/tcp_ipv6.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 3aad861975a0..b1bfbdd85d3c 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -581,7 +581,10 @@ static int tcp_v6_md5_do_add(struct sock *sk, struct in6_addr *peer,
581 } 581 }
582 sk->sk_route_caps &= ~NETIF_F_GSO_MASK; 582 sk->sk_route_caps &= ~NETIF_F_GSO_MASK;
583 } 583 }
584 tcp_alloc_md5sig_pool(); 584 if (tcp_alloc_md5sig_pool() == NULL) {
585 kfree(newkey);
586 return -ENOMEM;
587 }
585 if (tp->md5sig_info->alloced6 == tp->md5sig_info->entries6) { 588 if (tp->md5sig_info->alloced6 == tp->md5sig_info->entries6) {
586 keys = kmalloc((sizeof (tp->md5sig_info->keys6[0]) * 589 keys = kmalloc((sizeof (tp->md5sig_info->keys6[0]) *
587 (tp->md5sig_info->entries6 + 1)), GFP_ATOMIC); 590 (tp->md5sig_info->entries6 + 1)), GFP_ATOMIC);