aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/dccp/ccid.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/dccp/ccid.h b/net/dccp/ccid.h
index 95eb47d8551..c6767b28224 100644
--- a/net/dccp/ccid.h
+++ b/net/dccp/ccid.h
@@ -97,13 +97,15 @@ static inline int ccid_hc_tx_init(struct ccid *ccid, struct sock *sk)
static inline void ccid_hc_rx_exit(struct ccid *ccid, struct sock *sk)
{
- if (ccid->ccid_hc_rx_exit != NULL)
+ if (ccid->ccid_hc_rx_exit != NULL &&
+ dccp_sk(sk)->dccps_hc_rx_ccid_private != NULL)
ccid->ccid_hc_rx_exit(sk);
}
static inline void ccid_hc_tx_exit(struct ccid *ccid, struct sock *sk)
{
- if (ccid->ccid_hc_tx_exit != NULL)
+ if (ccid->ccid_hc_tx_exit != NULL &&
+ dccp_sk(sk)->dccps_hc_tx_ccid_private != NULL)
ccid->ccid_hc_tx_exit(sk);
}