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

Jenkins2 asteriskteam at digium.com
Fri Apr 6 06:36:36 CDT 2018


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

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
  Jenkins2: Approved for Submit



diff --git a/apps/app_agent_pool.c b/apps/app_agent_pool.c
index 3c2ea38..805c403 100644
--- a/apps/app_agent_pool.c
+++ b/apps/app_agent_pool.c
@@ -438,6 +438,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/8725
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib427ffc2c802620eaafb08b1c2a17dddd8fb8eb6
Gerrit-Change-Number: 8725
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp 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/50c16971/attachment.html>


More information about the asterisk-code-review mailing list