res_pjsip: Fix leak on error in ast_sip_auth_vector_init.

Change-Id: Ib0fc7a18f3135ca8990c3984c9e15f6d26e556e8
This commit is contained in:
Corey Farrell
2017-11-06 18:28:35 -05:00
parent ad7860fd19
commit e4fba95022

View File

@@ -510,6 +510,8 @@ int ast_sip_auth_vector_init(struct ast_sip_auth_vector *auths, const char *valu
goto failure; goto failure;
} }
if (AST_VECTOR_APPEND(auths, val)) { if (AST_VECTOR_APPEND(auths, val)) {
ast_free(val);
goto failure; goto failure;
} }
} }