Skip to content

Commit c1db7a2

Browse files
Daniel Borkmanndavem330
authored andcommitted
net: sctp: sctp_ulpq: remove 'malloced' struct member
The structure sctp_ulpq is embedded into sctp_association and never separately allocated, also ulpq->malloced is always 0, so that kfree() is never called. Therefore, remove this code. Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Neil Horman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 50181c0 commit c1db7a2

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

include/net/sctp/ulpqueue.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949

5050
/* A structure to carry information to the ULP (e.g. Sockets API) */
5151
struct sctp_ulpq {
52-
char malloced;
5352
char pd_mode;
5453
struct sctp_association *asoc;
5554
struct sk_buff_head reasm;

net/sctp/ulpqueue.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ struct sctp_ulpq *sctp_ulpq_init(struct sctp_ulpq *ulpq,
6868
skb_queue_head_init(&ulpq->reasm);
6969
skb_queue_head_init(&ulpq->lobby);
7070
ulpq->pd_mode = 0;
71-
ulpq->malloced = 0;
7271

7372
return ulpq;
7473
}
@@ -96,8 +95,6 @@ void sctp_ulpq_flush(struct sctp_ulpq *ulpq)
9695
void sctp_ulpq_free(struct sctp_ulpq *ulpq)
9796
{
9897
sctp_ulpq_flush(ulpq);
99-
if (ulpq->malloced)
100-
kfree(ulpq);
10198
}
10299

103100
/* Process an incoming DATA chunk. */

0 commit comments

Comments
 (0)