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

Richard Mudgett asteriskteam at digium.com
Wed Apr 4 18:02:36 CDT 2018


Richard Mudgett has uploaded this change for review. ( 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(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/24/8724/1

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: newchange
Gerrit-Change-Id: Ib427ffc2c802620eaafb08b1c2a17dddd8fb8eb6
Gerrit-Change-Number: 8724
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180404/f3fae2ae/attachment.html>


More information about the asterisk-code-review mailing list