Added sanity checking so we can't dereference NULL trying to call a callback
authorAlexandra Ellwood <lxs@mit.edu>
Tue, 18 Sep 2007 19:53:47 +0000 (19:53 +0000)
committerAlexandra Ellwood <lxs@mit.edu>
Tue, 18 Sep 2007 19:53:47 +0000 (19:53 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19952 dc483132-0cff-0310-8789-dd5450dbe970

src/ccapi/server/ccs_callback.c

index 3088258abbcd703d3cfce36509152ab5edf9c9eb..a962460ed44366747229a8ad3bb81e5b9596874e 100644 (file)
@@ -142,7 +142,12 @@ cc_int32 ccs_callback_invalidate (ccs_callback_t io_callback)
     
     if (!err) {
         io_callback->pending = 0; /* client is dead, don't try to talk to it */
-        err = io_callback->owner_invalidate (io_callback->owner, io_callback);
+       if (io_callback->owner_invalidate) {
+           err = io_callback->owner_invalidate (io_callback->owner, io_callback);
+       } else {
+           cci_debug_printf ("WARNING %s() unable to notify callback owner!", 
+                             __FUNCTION__);
+       }
     }
     
     return cci_check_error (err);
@@ -222,7 +227,7 @@ cc_int32 ccs_callback_client_pipe (ccs_callback_t  in_callback,
 {
     cc_int32 err = ccNoError;
     
-    if (!in_callback        ) { err = cci_check_error (ccErrBadParam); }
+    if (!in_callback    ) { err = cci_check_error (ccErrBadParam); }
     if (!out_client_pipe) { err = cci_check_error (ccErrBadParam); }
     
     if (!err) {