Skip to content

Commit d99a7bd

Browse files
Gerrit Renkerdavem330
authored andcommitted
dccp: Cleanup routines for feature negotiation
This inserts the required de-allocation routines for memory allocated by feature negotiation in the socket destructors, replacing dccp_feat_clean() in one instance. Signed-off-by: Gerrit Renker <[email protected]> Acked-by: Ian McDonald <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ac75773 commit d99a7bd

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

net/dccp/ipv4.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,7 @@ static void dccp_v4_ctl_send_reset(struct sock *sk, struct sk_buff *rxskb)
545545

546546
static void dccp_v4_reqsk_destructor(struct request_sock *req)
547547
{
548+
dccp_feat_list_purge(&dccp_rsk(req)->dreq_featneg);
548549
kfree(inet_rsk(req)->opt);
549550
}
550551

net/dccp/ipv6.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ static int dccp_v6_send_response(struct sock *sk, struct request_sock *req)
304304

305305
static void dccp_v6_reqsk_destructor(struct request_sock *req)
306306
{
307+
dccp_feat_list_purge(&dccp_rsk(req)->dreq_featneg);
307308
if (inet6_rsk(req)->pktopts != NULL)
308309
kfree_skb(inet6_rsk(req)->pktopts);
309310
}

net/dccp/proto.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ void dccp_destroy_sock(struct sock *sk)
268268
dp->dccps_hc_rx_ccid = dp->dccps_hc_tx_ccid = NULL;
269269

270270
/* clean up feature negotiation state */
271-
dccp_feat_clean(dmsk);
271+
dccp_feat_list_purge(&dp->dccps_featneg);
272272
}
273273

274274
EXPORT_SYMBOL_GPL(dccp_destroy_sock);

0 commit comments

Comments
 (0)