[Asterisk-code-review] res pjsip: Fix leak on error in ast sip auth vector init. (asterisk[13])

Jenkins2 asteriskteam at digium.com
Tue Nov 7 17:38:39 CST 2017


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/7063 )

Change subject: res_pjsip: Fix leak on error in ast_sip_auth_vector_init.
......................................................................

res_pjsip: Fix leak on error in ast_sip_auth_vector_init.

Change-Id: Ib0fc7a18f3135ca8990c3984c9e15f6d26e556e8
---
M res/res_pjsip/pjsip_configuration.c
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, but someone else must approve
  Richard Mudgett: Looks good to me, approved
  Jenkins2: Approved for Submit



diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c
index e000039..81234d6 100644
--- a/res/res_pjsip/pjsip_configuration.c
+++ b/res/res_pjsip/pjsip_configuration.c
@@ -510,6 +510,8 @@
 			goto failure;
 		}
 		if (AST_VECTOR_APPEND(auths, val)) {
+			ast_free(val);
+
 			goto failure;
 		}
 	}

-- 
To view, visit https://gerrit.asterisk.org/7063
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib0fc7a18f3135ca8990c3984c9e15f6d26e556e8
Gerrit-Change-Number: 7063
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171107/e1db7d53/attachment.html>


More information about the asterisk-code-review mailing list