tree 934c71228174d0da4a324afc1b7b001db9978911
parent a4beb1b64f5846e216bf2c439022df480151902a
author Arnaldo Carvalho de Melo <[EMAIL PROTECTED]> Wed, 24 Aug 2005 11:51:13 
-0700
committer David S. Miller <[EMAIL PROTECTED]> Tue, 30 Aug 2005 06:04:48 -0700

[CCID]: Make ccid_hc_[rt]x_exit accept NULL arguments

Just like kfree, etc it will just not call the CCID exit
routines when the private data area is set to NULL.

Signed-off-by: Arnaldo Carvalho de Melo <[EMAIL PROTECTED]>
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>

 net/dccp/ccid.h |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/net/dccp/ccid.h b/net/dccp/ccid.h
--- a/net/dccp/ccid.h
+++ b/net/dccp/ccid.h
@@ -97,13 +97,15 @@ static inline int ccid_hc_tx_init(struct
 
 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);
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to