From: Rupa Schomaker Date: Fri, 6 Nov 2009 08:45:58 +0000 (+0000) Subject: some cases the cid is set back to NULL, alloc a new one if needed X-Git-Tag: v1.0.6~1485 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7c5217450eeca489c01c38e50d78dd44d891d4c;p=thirdparty%2Ffreeswitch.git some cases the cid is set back to NULL, alloc a new one if needed git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15380 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/applications/mod_cidlookup/mod_cidlookup.c b/src/mod/applications/mod_cidlookup/mod_cidlookup.c index 6c3f0220e2..9a8542df5f 100755 --- a/src/mod/applications/mod_cidlookup/mod_cidlookup.c +++ b/src/mod/applications/mod_cidlookup/mod_cidlookup.c @@ -563,7 +563,11 @@ static cid_data_t *do_lookup(switch_memory_pool_t *pool, switch_event_t *event, } } -done: +done: + if (!cid) { + cid = switch_core_alloc(pool, sizeof(cid_data_t)); + switch_assert(cid); + } /* append area if we can */ if (!cid->area && !skipcitystate &&