mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 20:04:50 +00:00
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/ ........ Merged revisions 407324 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407325 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -231,9 +231,13 @@ int ast_sip_auth_vector_init(struct ast_sip_auth_vector *auths, const char *valu
|
||||
char *val;
|
||||
|
||||
ast_assert(auths != NULL);
|
||||
ast_assert(AST_VECTOR_SIZE(auths) == 0);
|
||||
|
||||
AST_VECTOR_INIT(auths, 1);
|
||||
if (AST_VECTOR_SIZE(auths)) {
|
||||
ast_sip_auth_vector_destroy(auths);
|
||||
}
|
||||
if (AST_VECTOR_INIT(auths, 1)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
while ((val = strsep(&auth_names, ","))) {
|
||||
val = ast_strdup(val);
|
||||
|
Reference in New Issue
Block a user