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

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


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



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/25/8725/1

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: newchange
Gerrit-Change-Id: Ib427ffc2c802620eaafb08b1c2a17dddd8fb8eb6
Gerrit-Change-Number: 8725
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/178ae2d5/attachment.html>


More information about the asterisk-code-review mailing list