[Asterisk-code-review] app agent pool.c: Fix off nominal ref leak. (asterisk[13])

Joshua Colp asteriskteam at digium.com
Fri Apr 6 06:34:03 CDT 2018


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/8724 )

Change subject: app_agent_pool.c: Fix off nominal ref leak.
......................................................................

app_agent_pool.c: Fix off nominal ref leak.

Change-Id: Ib427ffc2c802620eaafb08b1c2a17dddd8fb8eb6
---
M apps/app_agent_pool.c
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Sean Bright: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved; Approved for Submit



diff --git a/apps/app_agent_pool.c b/apps/app_agent_pool.c
index ef8b95e..07040f6 100644
--- a/apps/app_agent_pool.c
+++ b/apps/app_agent_pool.c
@@ -440,6 +440,7 @@
 	cfg = ao2_alloc_options(sizeof(*cfg), agent_cfg_destructor,
 		AO2_ALLOC_OPT_LOCK_NOLOCK);
 	if (!cfg || ast_string_field_init(cfg, 64)) {
+		ao2_cleanup(cfg);
 		return NULL;
 	}
 	ast_string_field_set(cfg, username, name);

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

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib427ffc2c802620eaafb08b1c2a17dddd8fb8eb6
Gerrit-Change-Number: 8724
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180406/59004e5f/attachment-0001.html>


More information about the asterisk-code-review mailing list