diff options
Diffstat (limited to 'net/sctp/protocol.c')
-rw-r--r-- | net/sctp/protocol.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index d5878ae55840..4e0eeb113ef5 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -101,7 +101,6 @@ static void sctp_v4_copy_addrlist(struct list_head *addrlist, | |||
101 | addr = kzalloc(sizeof(*addr), GFP_ATOMIC); | 101 | addr = kzalloc(sizeof(*addr), GFP_ATOMIC); |
102 | if (addr) { | 102 | if (addr) { |
103 | addr->a.v4.sin_family = AF_INET; | 103 | addr->a.v4.sin_family = AF_INET; |
104 | addr->a.v4.sin_port = 0; | ||
105 | addr->a.v4.sin_addr.s_addr = ifa->ifa_local; | 104 | addr->a.v4.sin_addr.s_addr = ifa->ifa_local; |
106 | addr->valid = 1; | 105 | addr->valid = 1; |
107 | INIT_LIST_HEAD(&addr->list); | 106 | INIT_LIST_HEAD(&addr->list); |
@@ -776,10 +775,9 @@ static int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev, | |||
776 | 775 | ||
777 | switch (ev) { | 776 | switch (ev) { |
778 | case NETDEV_UP: | 777 | case NETDEV_UP: |
779 | addr = kmalloc(sizeof(struct sctp_sockaddr_entry), GFP_ATOMIC); | 778 | addr = kzalloc(sizeof(*addr), GFP_ATOMIC); |
780 | if (addr) { | 779 | if (addr) { |
781 | addr->a.v4.sin_family = AF_INET; | 780 | addr->a.v4.sin_family = AF_INET; |
782 | addr->a.v4.sin_port = 0; | ||
783 | addr->a.v4.sin_addr.s_addr = ifa->ifa_local; | 781 | addr->a.v4.sin_addr.s_addr = ifa->ifa_local; |
784 | addr->valid = 1; | 782 | addr->valid = 1; |
785 | spin_lock_bh(&net->sctp.local_addr_lock); | 783 | spin_lock_bh(&net->sctp.local_addr_lock); |