From 8ddf641eee9f0b9e07dfe309eceb983368ceca29 Mon Sep 17 00:00:00 2001 From: Jennifer Richards Date: Thu, 31 May 2018 20:46:07 -0400 Subject: [PATCH] Return NULL when tr_cfg_parse_one_apc() fails --- common/tr_config_realms.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/tr_config_realms.c b/common/tr_config_realms.c index 60bae00..3c189ee 100644 --- a/common/tr_config_realms.c +++ b/common/tr_config_realms.c @@ -187,6 +187,9 @@ TR_APC *tr_cfg_parse_apcs(TALLOC_CTX *mem_ctx, json_t *japcs, TR_CFG_RC *rc) *rc=TR_CFG_SUCCESS; cleanup: + if (*rc != TR_CFG_SUCCESS) + apcs = NULL; + talloc_free(tmp_ctx); return apcs; } -- 2.1.4