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:28:35 +0000 (18:28 -0500)
Change-Id: Ib0fc7a18f3135ca8990c3984c9e15f6d26e556e8

res/res_pjsip/pjsip_configuration.c

index a6afe5e..168d869 100644 (file)
@@ -508,6 +508,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;
                }
        }