]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
res_pjsip: Fix leak on error in ast_sip_auth_vector_init.
authorCorey Farrell <git@cfware.com>
Mon, 6 Nov 2017 23:28:35 +0000 (18:28 -0500)
committerCorey Farrell <git@cfware.com>
Mon, 6 Nov 2017 23:31:51 +0000 (18:31 -0500)
Change-Id: Ib0fc7a18f3135ca8990c3984c9e15f6d26e556e8

res/res_pjsip/pjsip_configuration.c

index e000039d2dfd0e70cec7667f2488501a81ef07a0..81234d695c09e41548c1cd5341af2d817140fa32 100644 (file)
@@ -510,6 +510,8 @@ int ast_sip_auth_vector_init(struct ast_sip_auth_vector *auths, const char *valu
                        goto failure;
                }
                if (AST_VECTOR_APPEND(auths, val)) {
+                       ast_free(val);
+
                        goto failure;
                }
        }