]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_pjsip: Fix assertion for pjsip.conf authorization list options.
authorRichard Mudgett <rmudgett@digium.com>
Tue, 4 Feb 2014 18:35:47 +0000 (18:35 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Tue, 4 Feb 2014 18:35:47 +0000 (18:35 +0000)
(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

res/res_pjsip/pjsip_configuration.c

index 3d1d5d7bcd60b9999ce9c89c01a607853d110ba8..04c4155bd02a6b63f7e9d3c44ad6a77e8b728580 100644 (file)
@@ -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) {