diff options
Diffstat (limited to 'net/dccp')
-rw-r--r-- | net/dccp/ipv4.c | 6 | ||||
-rw-r--r-- | net/dccp/proto.c | 3 |
2 files changed, 3 insertions, 6 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index 4b9bc81ae1a3..ca03521112c5 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c | |||
@@ -1263,10 +1263,8 @@ static int dccp_v4_destroy_sock(struct sock *sk) | |||
1263 | if (inet_csk(sk)->icsk_bind_hash != NULL) | 1263 | if (inet_csk(sk)->icsk_bind_hash != NULL) |
1264 | inet_put_port(&dccp_hashinfo, sk); | 1264 | inet_put_port(&dccp_hashinfo, sk); |
1265 | 1265 | ||
1266 | if (dp->dccps_service_list != NULL) { | 1266 | kfree(dp->dccps_service_list); |
1267 | kfree(dp->dccps_service_list); | 1267 | dp->dccps_service_list = NULL; |
1268 | dp->dccps_service_list = NULL; | ||
1269 | } | ||
1270 | 1268 | ||
1271 | ccid_hc_rx_exit(dp->dccps_hc_rx_ccid, sk); | 1269 | ccid_hc_rx_exit(dp->dccps_hc_rx_ccid, sk); |
1272 | ccid_hc_tx_exit(dp->dccps_hc_tx_ccid, sk); | 1270 | ccid_hc_tx_exit(dp->dccps_hc_tx_ccid, sk); |
diff --git a/net/dccp/proto.c b/net/dccp/proto.c index a021c3422f67..e0ace7cbb996 100644 --- a/net/dccp/proto.c +++ b/net/dccp/proto.c | |||
@@ -238,8 +238,7 @@ static int dccp_setsockopt_service(struct sock *sk, const u32 service, | |||
238 | lock_sock(sk); | 238 | lock_sock(sk); |
239 | dp->dccps_service = service; | 239 | dp->dccps_service = service; |
240 | 240 | ||
241 | if (dp->dccps_service_list != NULL) | 241 | kfree(dp->dccps_service_list); |
242 | kfree(dp->dccps_service_list); | ||
243 | 242 | ||
244 | dp->dccps_service_list = sl; | 243 | dp->dccps_service_list = sl; |
245 | release_sock(sk); | 244 | release_sock(sk); |