From 8b674d05e33a80261dde28930591ff37dc8938b4 Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Tue, 2 Jul 2013 16:37:42 +0200 Subject: [PATCH] avoid crash if SIP request cannot be created --- coreapi/bellesip_sal/sal_op_impl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/coreapi/bellesip_sal/sal_op_impl.c b/coreapi/bellesip_sal/sal_op_impl.c index 0002a013b..0f829de91 100644 --- a/coreapi/bellesip_sal/sal_op_impl.c +++ b/coreapi/bellesip_sal/sal_op_impl.c @@ -268,6 +268,9 @@ static int _sal_op_send_request_with_contact(SalOp* op, belle_sip_request_t* req int sal_op_send_request(SalOp* op, belle_sip_request_t* request) { bool_t need_contact=FALSE; + if (request==NULL) { + return -1; /*sanity check*/ + } /* Header field where proxy ACK BYE CAN INV OPT REG ___________________________________________________________