From: Dragos Oancea Date: Fri, 31 Jan 2020 23:11:40 +0000 (+0000) Subject: [sofia-sip] scan-build: Access to field 'nh_destroyed' results in a dereference of... X-Git-Tag: v1.10.3^2~208^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F300%2Fhead;p=thirdparty%2Ffreeswitch.git [sofia-sip] scan-build: Access to field 'nh_destroyed' results in a dereference of a null pointer (loaded from variable 'nh') --- diff --git a/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c b/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c index 7364d4b255..cdd3a191ae 100644 --- a/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c +++ b/libs/sofia-sip/libsofia-sip-ua/nua/nua_stack.c @@ -657,7 +657,7 @@ void nua_stack_signal(nua_t *nua, su_msg_r msg, nua_ee_data_t *ee) nua_stack_respond(nua, nh, e->e_status, e->e_phrase, tags); break; case nua_r_destroy: - if (!nh->nh_destroyed) { + if (nh && !nh->nh_destroyed) { nua_stack_destroy_handle(nua, nh, tags); su_msg_destroy(nua->nua_signal); }