]> git.baikalelectronics.ru Git - kernel.git/commit
net: sctp: remove sctp_ep_common struct member 'malloced'
authorDaniel Borkmann <dborkman@redhat.com>
Mon, 15 Apr 2013 03:27:17 +0000 (03:27 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Apr 2013 18:11:37 +0000 (14:11 -0400)
commit2dac1692d6cf27bd4d4a5323cd946430c4d5cfc9
treef8d3a419ff1413613a1f05d790cac7dffc75dbc4
parent0d477b2be50e9d8c81a45badeb5bcd80d6f686c9
net: sctp: remove sctp_ep_common struct member 'malloced'

There is actually no need to keep this member in the structure, because
after init it's always 1 anyway, thus always kfree called. This seems to
be an ancient leftover from the very initial implementation from 2.5
times. Only in case the initialization of an association fails, we leave
base.malloced as 0, but we nevertheless kfree it in the error path in
sctp_association_new().

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sctp/structs.h
net/sctp/associola.c
net/sctp/endpointola.c