aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp
diff options
context:
space:
mode:
authorGerrit Renker <gerrit@erg.abdn.ac.uk>2008-11-05 02:56:30 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-05 02:56:30 -0500
commitd99a7bd210a14001007fc5233597c78877f0a11c (patch)
tree366ef8703e0453608ed39e0e7c2f4f4d043a46e9 /net/dccp
parentac75773c2742d82cbcb078708df406e9017224b7 (diff)
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 <gerrit@erg.abdn.ac.uk> Acked-by: Ian McDonald <ian.mcdonald@jandi.co.nz> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp')
-rw-r--r--net/dccp/ipv4.c1
-rw-r--r--net/dccp/ipv6.c1
-rw-r--r--net/dccp/proto.c2
3 files changed, 3 insertions, 1 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index cbf522dfecc4..528baa2e5be4 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -545,6 +545,7 @@ out:
545 545
546static void dccp_v4_reqsk_destructor(struct request_sock *req) 546static void dccp_v4_reqsk_destructor(struct request_sock *req)
547{ 547{
548 dccp_feat_list_purge(&dccp_rsk(req)->dreq_featneg);
548 kfree(inet_rsk(req)->opt); 549 kfree(inet_rsk(req)->opt);
549} 550}
550 551
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index 4e172ccfd76c..4aa1148cdb20 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -304,6 +304,7 @@ done:
304 304
305static void dccp_v6_reqsk_destructor(struct request_sock *req) 305static void dccp_v6_reqsk_destructor(struct request_sock *req)
306{ 306{
307 dccp_feat_list_purge(&dccp_rsk(req)->dreq_featneg);
307 if (inet6_rsk(req)->pktopts != NULL) 308 if (inet6_rsk(req)->pktopts != NULL)
308 kfree_skb(inet6_rsk(req)->pktopts); 309 kfree_skb(inet6_rsk(req)->pktopts);
309} 310}
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
index 1cdf4ae99605..dafcefd86594 100644
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -268,7 +268,7 @@ void dccp_destroy_sock(struct sock *sk)
268 dp->dccps_hc_rx_ccid = dp->dccps_hc_tx_ccid = NULL; 268 dp->dccps_hc_rx_ccid = dp->dccps_hc_tx_ccid = NULL;
269 269
270 /* clean up feature negotiation state */ 270 /* clean up feature negotiation state */
271 dccp_feat_clean(dmsk); 271 dccp_feat_list_purge(&dp->dccps_featneg);
272} 272}
273 273
274EXPORT_SYMBOL_GPL(dccp_destroy_sock); 274EXPORT_SYMBOL_GPL(dccp_destroy_sock);