aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-04-16 07:07:12 -0400
committerDavid S. Miller <davem@davemloft.net>2013-04-17 14:13:02 -0400
commit165a4c31278c980862b2c2ddec408cf30341f3ec (patch)
tree556c9b4284952643f7f184088c9fe997ccc37eda /net/sctp
parentee16371e6c737684215ee10b4b9756b610d81272 (diff)
net: sctp: sctp_outq: remove 'malloced' from its struct
sctp_outq is embedded into sctp_association, and thus never kmalloced in any way. Also, malloced is always 0, thus kfree() is never called. Therefore, remove that dead piece of code. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/outqueue.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c
index 01dca753db16..d4c137e1ab85 100644
--- a/net/sctp/outqueue.c
+++ b/net/sctp/outqueue.c
@@ -217,8 +217,6 @@ void sctp_outq_init(struct sctp_association *asoc, struct sctp_outq *q)
217 q->outstanding_bytes = 0; 217 q->outstanding_bytes = 0;
218 q->empty = 1; 218 q->empty = 1;
219 q->cork = 0; 219 q->cork = 0;
220
221 q->malloced = 0;
222 q->out_qlen = 0; 220 q->out_qlen = 0;
223} 221}
224 222
@@ -295,10 +293,6 @@ void sctp_outq_free(struct sctp_outq *q)
295{ 293{
296 /* Throw away leftover chunks. */ 294 /* Throw away leftover chunks. */
297 __sctp_outq_teardown(q); 295 __sctp_outq_teardown(q);
298
299 /* If we were kmalloc()'d, free the memory. */
300 if (q->malloced)
301 kfree(q);
302} 296}
303 297
304/* Put a new chunk in an sctp_outq. */ 298/* Put a new chunk in an sctp_outq. */