From: Richard Mudgett Date: Tue, 4 Feb 2014 18:35:47 +0000 (+0000) Subject: res_pjsip: Fix assertion for pjsip.conf authorization list options. X-Git-Tag: 12.1.0-rc1~3^2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0cef24086d2c63b545351798ece330ce20a750f5;p=thirdparty%2Fasterisk.git res_pjsip: Fix assertion for pjsip.conf authorization list options. (closes issue ASTERISK-23168) Reported by: George Joseph Review: https://reviewboard.asterisk.org/r/3143/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@407324 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c index 3d1d5d7bcd..04c4155bd0 100644 --- a/res/res_pjsip/pjsip_configuration.c +++ b/res/res_pjsip/pjsip_configuration.c @@ -233,8 +233,10 @@ int ast_sip_auth_array_init(struct ast_sip_auth_array *auths, const char *value) const char **alloced_auths; ast_assert(auths != NULL); - ast_assert(auths->names == NULL); - ast_assert(!auths->num); + + if (auths->names) { + ast_sip_auth_array_destroy(auths); + } while ((val = strsep(&auth_names, ","))) { if (auths->num >= num_alloced) {