diff options
-rw-r--r-- | include/net/sctp/structs.h | 3 | ||||
-rw-r--r-- | net/sctp/output.c | 5 |
2 files changed, 2 insertions, 6 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 64d469845f25..1bd4c4144fe8 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -714,8 +714,7 @@ struct sctp_packet { | |||
714 | has_sack:1, /* This packet contains a SACK chunk. */ | 714 | has_sack:1, /* This packet contains a SACK chunk. */ |
715 | has_auth:1, /* This packet contains an AUTH chunk */ | 715 | has_auth:1, /* This packet contains an AUTH chunk */ |
716 | has_data:1, /* This packet contains at least 1 DATA chunk */ | 716 | has_data:1, /* This packet contains at least 1 DATA chunk */ |
717 | ipfragok:1, /* So let ip fragment this packet */ | 717 | ipfragok:1; /* So let ip fragment this packet */ |
718 | malloced:1; /* Is it malloced? */ | ||
719 | }; | 718 | }; |
720 | 719 | ||
721 | struct sctp_packet *sctp_packet_init(struct sctp_packet *, | 720 | struct sctp_packet *sctp_packet_init(struct sctp_packet *, |
diff --git a/net/sctp/output.c b/net/sctp/output.c index f5200a2ad852..bbef4a7a9b56 100644 --- a/net/sctp/output.c +++ b/net/sctp/output.c | |||
@@ -136,7 +136,7 @@ struct sctp_packet *sctp_packet_init(struct sctp_packet *packet, | |||
136 | packet->overhead = overhead; | 136 | packet->overhead = overhead; |
137 | sctp_packet_reset(packet); | 137 | sctp_packet_reset(packet); |
138 | packet->vtag = 0; | 138 | packet->vtag = 0; |
139 | packet->malloced = 0; | 139 | |
140 | return packet; | 140 | return packet; |
141 | } | 141 | } |
142 | 142 | ||
@@ -151,9 +151,6 @@ void sctp_packet_free(struct sctp_packet *packet) | |||
151 | list_del_init(&chunk->list); | 151 | list_del_init(&chunk->list); |
152 | sctp_chunk_free(chunk); | 152 | sctp_chunk_free(chunk); |
153 | } | 153 | } |
154 | |||
155 | if (packet->malloced) | ||
156 | kfree(packet); | ||
157 | } | 154 | } |
158 | 155 | ||
159 | /* This routine tries to append the chunk to the offered packet. If adding | 156 | /* This routine tries to append the chunk to the offered packet. If adding |