aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ipv4.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp/ipv4.c')
-rw-r--r--net/dccp/ipv4.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index fcfb486f90c2..aa7708fed32e 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -1058,14 +1058,16 @@ int dccp_v4_init_sock(struct sock *sk)
1058 if (dp->dccps_hc_rx_ackvec == NULL) 1058 if (dp->dccps_hc_rx_ackvec == NULL)
1059 return -ENOMEM; 1059 return -ENOMEM;
1060 } 1060 }
1061 dp->dccps_hc_rx_ccid = ccid_init(dp->dccps_options.dccpo_rx_ccid, 1061 dp->dccps_hc_rx_ccid =
1062 sk); 1062 ccid_hc_rx_new(dp->dccps_options.dccpo_rx_ccid,
1063 dp->dccps_hc_tx_ccid = ccid_init(dp->dccps_options.dccpo_tx_ccid, 1063 sk, GFP_KERNEL);
1064 sk); 1064 dp->dccps_hc_tx_ccid =
1065 if (dp->dccps_hc_rx_ccid == NULL || 1065 ccid_hc_tx_new(dp->dccps_options.dccpo_tx_ccid,
1066 dp->dccps_hc_tx_ccid == NULL) { 1066 sk, GFP_KERNEL);
1067 ccid_exit(dp->dccps_hc_rx_ccid, sk); 1067 if (unlikely(dp->dccps_hc_rx_ccid == NULL ||
1068 ccid_exit(dp->dccps_hc_tx_ccid, sk); 1068 dp->dccps_hc_tx_ccid == NULL)) {
1069 ccid_hc_rx_delete(dp->dccps_hc_rx_ccid, sk);
1070 ccid_hc_tx_delete(dp->dccps_hc_tx_ccid, sk);
1069 if (dp->dccps_options.dccpo_send_ack_vector) { 1071 if (dp->dccps_options.dccpo_send_ack_vector) {
1070 dccp_ackvec_free(dp->dccps_hc_rx_ackvec); 1072 dccp_ackvec_free(dp->dccps_hc_rx_ackvec);
1071 dp->dccps_hc_rx_ackvec = NULL; 1073 dp->dccps_hc_rx_ackvec = NULL;
@@ -1120,14 +1122,12 @@ int dccp_v4_destroy_sock(struct sock *sk)
1120 kfree(dp->dccps_service_list); 1122 kfree(dp->dccps_service_list);
1121 dp->dccps_service_list = NULL; 1123 dp->dccps_service_list = NULL;
1122 1124
1123 ccid_hc_rx_exit(dp->dccps_hc_rx_ccid, sk);
1124 ccid_hc_tx_exit(dp->dccps_hc_tx_ccid, sk);
1125 if (dp->dccps_options.dccpo_send_ack_vector) { 1125 if (dp->dccps_options.dccpo_send_ack_vector) {
1126 dccp_ackvec_free(dp->dccps_hc_rx_ackvec); 1126 dccp_ackvec_free(dp->dccps_hc_rx_ackvec);
1127 dp->dccps_hc_rx_ackvec = NULL; 1127 dp->dccps_hc_rx_ackvec = NULL;
1128 } 1128 }
1129 ccid_exit(dp->dccps_hc_rx_ccid, sk); 1129 ccid_hc_rx_delete(dp->dccps_hc_rx_ccid, sk);
1130 ccid_exit(dp->dccps_hc_tx_ccid, sk); 1130 ccid_hc_tx_delete(dp->dccps_hc_tx_ccid, sk);
1131 dp->dccps_hc_rx_ccid = dp->dccps_hc_tx_ccid = NULL; 1131 dp->dccps_hc_rx_ccid = dp->dccps_hc_tx_ccid = NULL;
1132 1132
1133 /* clean up feature negotiation state */ 1133 /* clean up feature negotiation state */