mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
ae88408256
commit
3e3251b3f2
2 changed files with 2 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue