mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
app_agent_pool.c: Fix off nominal ref leak.
Change-Id: Ib427ffc2c802620eaafb08b1c2a17dddd8fb8eb6
This commit is contained in:
@@ -438,6 +438,7 @@ static void *agent_cfg_alloc(const char *name)
|
||||
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);
|
||||
|
Reference in New Issue
Block a user