File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,14 @@ void sctp_inq_init(struct sctp_inq *queue)
38
38
INIT_WORK (& queue -> immediate , NULL );
39
39
}
40
40
41
+ /* Properly release the chunk which is being worked on. */
42
+ static inline void sctp_inq_chunk_free (struct sctp_chunk * chunk )
43
+ {
44
+ if (chunk -> head_skb )
45
+ chunk -> skb = chunk -> head_skb ;
46
+ sctp_chunk_free (chunk );
47
+ }
48
+
41
49
/* Release the memory associated with an SCTP inqueue. */
42
50
void sctp_inq_free (struct sctp_inq * queue )
43
51
{
@@ -53,7 +61,7 @@ void sctp_inq_free(struct sctp_inq *queue)
53
61
* free it as well.
54
62
*/
55
63
if (queue -> in_progress ) {
56
- sctp_chunk_free (queue -> in_progress );
64
+ sctp_inq_chunk_free (queue -> in_progress );
57
65
queue -> in_progress = NULL ;
58
66
}
59
67
}
@@ -130,9 +138,7 @@ struct sctp_chunk *sctp_inq_pop(struct sctp_inq *queue)
130
138
goto new_skb ;
131
139
}
132
140
133
- if (chunk -> head_skb )
134
- chunk -> skb = chunk -> head_skb ;
135
- sctp_chunk_free (chunk );
141
+ sctp_inq_chunk_free (chunk );
136
142
chunk = queue -> in_progress = NULL ;
137
143
} else {
138
144
/* Nothing to do. Next chunk in the packet, please. */
You can’t perform that action at this time.
0 commit comments