提交 777b25a2 编写于 作者: A Arnaldo Carvalho de Melo 提交者: David S. Miller

[CCID]: Check if ccid is NULL in the hc_[tr]x_exit functions

For consistency with ccid_exit and to fix a bug when
IP_DCCP_UNLOAD_HACK is enabled as the control sock is not associated
to any CCID.
Signed-off-by: NArnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 061cb4a0
...@@ -110,14 +110,14 @@ static inline int ccid_hc_tx_init(struct ccid *ccid, struct sock *sk) ...@@ -110,14 +110,14 @@ 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) static inline void ccid_hc_rx_exit(struct ccid *ccid, struct sock *sk)
{ {
if (ccid->ccid_hc_rx_exit != NULL && if (ccid != NULL && ccid->ccid_hc_rx_exit != NULL &&
dccp_sk(sk)->dccps_hc_rx_ccid_private != NULL) dccp_sk(sk)->dccps_hc_rx_ccid_private != NULL)
ccid->ccid_hc_rx_exit(sk); ccid->ccid_hc_rx_exit(sk);
} }
static inline void ccid_hc_tx_exit(struct ccid *ccid, struct sock *sk) static inline void ccid_hc_tx_exit(struct ccid *ccid, struct sock *sk)
{ {
if (ccid->ccid_hc_tx_exit != NULL && if (ccid != NULL && ccid->ccid_hc_tx_exit != NULL &&
dccp_sk(sk)->dccps_hc_tx_ccid_private != NULL) dccp_sk(sk)->dccps_hc_tx_ccid_private != NULL)
ccid->ccid_hc_tx_exit(sk); ccid->ccid_hc_tx_exit(sk);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册