net: sctp: sctp_inq: remove dead code
authorDaniel Borkmann <dborkman@redhat.com>
Tue, 16 Apr 2013 11:07:11 +0000 (11:07 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Apr 2013 18:13:02 +0000 (14:13 -0400)
sctp_inq is never kmalloced, since it's integrated into sctp_ep_common
and only initialized from eps and assocs. Therefore, remove the dead
code from there.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sctp/structs.h
net/sctp/inqueue.c

index 3c1bb8dd1e26a306de8d6eaf865173da0edb77a4..125a19c73531c87a39ec93a7eecf3627c37986fc 100644 (file)
@@ -991,8 +991,6 @@ struct sctp_inq {
         * messages.
         */
        struct work_struct immediate;
-
-       int malloced;        /* Is this structure kfree()able?  */
 };
 
 void sctp_inq_init(struct sctp_inq *);
index 2d5ad280de388d07f3949a578ce6bbdf9cf6ae5f..3221d073448ce0356ac24078a3f69c6501e91371 100644 (file)
@@ -58,8 +58,6 @@ void sctp_inq_init(struct sctp_inq *queue)
 
        /* Create a task for delivering data.  */
        INIT_WORK(&queue->immediate, NULL);
-
-       queue->malloced = 0;
 }
 
 /* Release the memory associated with an SCTP inqueue.  */
@@ -80,11 +78,6 @@ void sctp_inq_free(struct sctp_inq *queue)
                sctp_chunk_free(queue->in_progress);
                queue->in_progress = NULL;
        }
-
-       if (queue->malloced) {
-               /* Dump the master memory segment.  */
-               kfree(queue);
-       }
 }
 
 /* Put a new packet in an SCTP inqueue.