diff options
author | zuul <zuul@gerrit.asterisk.org> | 2016-08-12 03:46:22 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2016-08-12 03:46:22 -0500 |
commit | 5fad1f110b345a79f7876cb4493939152261dff3 (patch) | |
tree | b3f2f1f1d93c6520b2e28258666d0507b7f4b1b7 /res/res_pjsip | |
parent | 71cc8398a8985d387a3f93e4c109e41863d6ab4e (diff) | |
parent | b6e03a5ff3eac6f5abdc524078722400f3371dc8 (diff) |
Merge "pjsip_distributor.c: Add missing allocation failure check."
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 715ecb263..bce428e42 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; } |