Commit 50181c07 authored by Daniel Borkmann's avatar Daniel Borkmann Committed by David S. Miller

net: sctp: sctp_bind_addr: remove dead code

The sctp_bind_addr structure has a 'malloced' member that is
always set to 0, thus in sctp_bind_addr_free() the kfree()
part can never be called. This part is embedded into
sctp_ep_common anyway and never alloced.
Signed-off-by: default avatarDaniel Borkmann <dborkman@redhat.com>
Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8fa5df6d
...@@ -1093,8 +1093,6 @@ struct sctp_bind_addr { ...@@ -1093,8 +1093,6 @@ struct sctp_bind_addr {
* peer(s) in INIT and INIT ACK chunks. * peer(s) in INIT and INIT ACK chunks.
*/ */
struct list_head address_list; struct list_head address_list;
int malloced; /* Are we kfree()able? */
}; };
void sctp_bind_addr_init(struct sctp_bind_addr *, __u16 port); void sctp_bind_addr_init(struct sctp_bind_addr *, __u16 port);
......
...@@ -131,8 +131,6 @@ int sctp_bind_addr_dup(struct sctp_bind_addr *dest, ...@@ -131,8 +131,6 @@ int sctp_bind_addr_dup(struct sctp_bind_addr *dest,
*/ */
void sctp_bind_addr_init(struct sctp_bind_addr *bp, __u16 port) void sctp_bind_addr_init(struct sctp_bind_addr *bp, __u16 port)
{ {
bp->malloced = 0;
INIT_LIST_HEAD(&bp->address_list); INIT_LIST_HEAD(&bp->address_list);
bp->port = port; bp->port = port;
} }
...@@ -155,11 +153,6 @@ void sctp_bind_addr_free(struct sctp_bind_addr *bp) ...@@ -155,11 +153,6 @@ void sctp_bind_addr_free(struct sctp_bind_addr *bp)
{ {
/* Empty the bind address list. */ /* Empty the bind address list. */
sctp_bind_addr_clean(bp); sctp_bind_addr_clean(bp);
if (bp->malloced) {
kfree(bp);
SCTP_DBG_OBJCNT_DEC(bind_addr);
}
} }
/* Add an address to the bind address list in the SCTP_bind_addr structure. */ /* Add an address to the bind address list in the SCTP_bind_addr structure. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment