summaryrefslogtreecommitdiffstats
path: root/net/sctp/output.c
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-04-18 21:59:37 +0000
committerDavid S. Miller <davem@davemloft.net>2013-04-22 16:25:21 -0400
commit3e3251b3f289528732edab386ddf73ac428359b7 (patch)
tree907f8cdc34e5fe5d71d73c849c4c0b4badd62523 /net/sctp/output.c
parentae8840825605f36f98f247323edc150e761cb64e (diff)
downloadop-kernel-dev-3e3251b3f289528732edab386ddf73ac428359b7.zip
op-kernel-dev-3e3251b3f289528732edab386ddf73ac428359b7.tar.gz
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/output.c')
-rw-r--r--net/sctp/output.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/sctp/output.c b/net/sctp/output.c
index f5200a2..bbef4a7 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,
packet->overhead = overhead;
sctp_packet_reset(packet);
packet->vtag = 0;
- packet->malloced = 0;
+
return packet;
}
@@ -151,9 +151,6 @@ void sctp_packet_free(struct sctp_packet *packet)
list_del_init(&chunk->list);
sctp_chunk_free(chunk);
}
-
- if (packet->malloced)
- kfree(packet);
}
/* This routine tries to append the chunk to the offered packet. If adding
OpenPOWER on IntegriCloud