Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 165a4c31 authored by Daniel Borkmann's avatar Daniel Borkmann Committed by David S. Miller
Browse files

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: default avatarDaniel Borkmann <dborkman@redhat.com>
Acked-by: default avatarNeil Horman <nhorman@tuxdriver.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ee16371e
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -1059,9 +1059,6 @@ struct sctp_outq {

	/* Is this structure empty?  */
	char empty;

	/* Are we kfree()able? */
	char malloced;
};

void sctp_outq_init(struct sctp_association *, struct sctp_outq *);
+0 −6
Original line number Diff line number Diff line
@@ -217,8 +217,6 @@ void sctp_outq_init(struct sctp_association *asoc, struct sctp_outq *q)
	q->outstanding_bytes = 0;
	q->empty = 1;
	q->cork  = 0;

	q->malloced = 0;
	q->out_qlen = 0;
}

@@ -295,10 +293,6 @@ void sctp_outq_free(struct sctp_outq *q)
{
	/* Throw away leftover chunks. */
	__sctp_outq_teardown(q);

	/* If we were kmalloc()'d, free the memory.  */
	if (q->malloced)
		kfree(q);
}

/* Put a new chunk in an sctp_outq.  */