diff options
author | Richard Mudgett <rmudgett@digium.com> | 2016-07-29 17:41:15 -0500 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2016-08-11 11:56:24 -0500 |
commit | 6e40334d89104f0208df6d57fe26c299e392f89e (patch) | |
tree | 6fa1be30295a34859fbdf612e60e0564f7c10024 /res/res_pjsip | |
parent | 1a3cc843718a35eb69168304c54ec9e7caec6ffd (diff) |
pjsip_distributor.c: Add missing allocation failure check.
Change-Id: I932ab2cea845e534d9ff318035b6de39972d3b28
Diffstat (limited to 'res/res_pjsip')
-rw-r--r-- | res/res_pjsip/pjsip_distributor.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/res/res_pjsip/pjsip_distributor.c b/res/res_pjsip/pjsip_distributor.c index e8ed89361..8a9119639 100644 --- a/res/res_pjsip/pjsip_distributor.c +++ b/res/res_pjsip/pjsip_distributor.c @@ -965,7 +965,7 @@ static int clean_task(const void *data) static void global_loaded(const char *object_type) { char *identifier_order = ast_sip_get_endpoint_identifier_order(); - char *io_copy = ast_strdupa(identifier_order); + char *io_copy = identifier_order ? ast_strdupa(identifier_order) : NULL; char *identify_method; ast_free(identifier_order); @@ -982,6 +982,7 @@ static void global_loaded(const char *object_type) /* Clean out the old task, if any */ ast_sched_clean_by_callback(prune_context, prune_task, clean_task); + /* Have to do something with the return value to shut up the stupid compiler. */ if (ast_sched_add_variable(prune_context, unidentified_prune_interval * 1000, prune_task, NULL, 1) < 0) { return; } |