diff options
author | Daniel Borkmann <dborkman@redhat.com> | 2013-04-18 17:59:37 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-22 16:25:21 -0400 |
commit | 3e3251b3f289528732edab386ddf73ac428359b7 (patch) | |
tree | 907f8cdc34e5fe5d71d73c849c4c0b4badd62523 /net/sctp | |
parent | ae8840825605f36f98f247323edc150e761cb64e (diff) |
net: sctp: minor: remove dead code from sctp_packet
struct sctp_packet is currently embedded into sctp_transport or
sits on the stack as 'singleton' in sctp_outq_flush(). Therefore,
its member 'malloced' is always 0, thus a kfree() is never called.
Because of that, we can just remove this code.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/output.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/sctp/output.c b/net/sctp/output.c index f5200a2ad852..bbef4a7a9b56 100644 --- a/net/sctp/output.c +++ b/net/sctp/output.c | |||
@@ -136,7 +136,7 @@ struct sctp_packet *sctp_packet_init(struct sctp_packet *packet, | |||
136 | packet->overhead = overhead; | 136 | packet->overhead = overhead; |
137 | sctp_packet_reset(packet); | 137 | sctp_packet_reset(packet); |
138 | packet->vtag = 0; | 138 | packet->vtag = 0; |
139 | packet->malloced = 0; | 139 | |
140 | return packet; | 140 | return packet; |
141 | } | 141 | } |
142 | 142 | ||
@@ -151,9 +151,6 @@ void sctp_packet_free(struct sctp_packet *packet) | |||
151 | list_del_init(&chunk->list); | 151 | list_del_init(&chunk->list); |
152 | sctp_chunk_free(chunk); | 152 | sctp_chunk_free(chunk); |
153 | } | 153 | } |
154 | |||
155 | if (packet->malloced) | ||
156 | kfree(packet); | ||
157 | } | 154 | } |
158 | 155 | ||
159 | /* This routine tries to append the chunk to the offered packet. If adding | 156 | /* This routine tries to append the chunk to the offered packet. If adding |