From 0f36c7f937916a10413b8519c5e05d8f752b12fb Mon Sep 17 00:00:00 2001 From: Alexandra Ellwood Date: Tue, 18 Sep 2007 19:53:47 +0000 Subject: [PATCH] Added sanity checking so we can't dereference NULL trying to call a callback git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19952 dc483132-0cff-0310-8789-dd5450dbe970 --- src/ccapi/server/ccs_callback.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ccapi/server/ccs_callback.c b/src/ccapi/server/ccs_callback.c index 3088258ab..a962460ed 100644 --- a/src/ccapi/server/ccs_callback.c +++ b/src/ccapi/server/ccs_callback.c @@ -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) { -- 2.26.2