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

Corey Farrell asteriskteam at digium.com
Mon Nov 6 17:30:43 CST 2017


Corey Farrell has uploaded this change for review. ( https://gerrit.asterisk.org/7061


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(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/61/7061/1

diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c
index a6afe5e..168d869 100644
--- a/res/res_pjsip/pjsip_configuration.c
+++ b/res/res_pjsip/pjsip_configuration.c
@@ -508,6 +508,8 @@
 			goto failure;
 		}
 		if (AST_VECTOR_APPEND(auths, val)) {
+			ast_free(val);
+
 			goto failure;
 		}
 	}

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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib0fc7a18f3135ca8990c3984c9e15f6d26e556e8
Gerrit-Change-Number: 7061
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171106/78a9cd97/attachment.html>


More information about the asterisk-code-review mailing list