diff options
author | Arnaldo Carvalho de Melo <acme@ghostprotocols.net> | 2005-10-11 06:24:20 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-10-11 06:24:20 +0200 |
commit | 777b25a2fea7129222eb11fba55c0a67982383ff (patch) | |
tree | 51e4a429fc09a8401371e47db9845d119408e576 /net/dccp | |
parent | [NETFILTER] ctnetlink: add support to change protocol info (diff) | |
download | linux-777b25a2fea7129222eb11fba55c0a67982383ff.tar.xz linux-777b25a2fea7129222eb11fba55c0a67982383ff.zip |
[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: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp')
-rw-r--r-- | net/dccp/ccid.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/dccp/ccid.h b/net/dccp/ccid.h index 21e55142dcd3..c37eeeaf5c6e 100644 --- a/net/dccp/ccid.h +++ b/net/dccp/ccid.h @@ -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) { - 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) 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 != NULL && ccid->ccid_hc_tx_exit != NULL && dccp_sk(sk)->dccps_hc_tx_ccid_private != NULL) ccid->ccid_hc_tx_exit(sk); } |