Initialize refcount for IDP realms
authorJennifer Richards <jennifer@painless-security.com>
Fri, 14 Jul 2017 22:49:10 +0000 (18:49 -0400)
committerJennifer Richards <jennifer@painless-security.com>
Fri, 14 Jul 2017 22:49:10 +0000 (18:49 -0400)
common/tr_config.c
common/tr_idp.c

index 4fa6506..d48902b 100644 (file)
@@ -2088,7 +2088,7 @@ TR_CFG_RC tr_parse_config(TR_CFG_MGR *cfg_mgr, const char *config_dir, int n, st
     goto cleanup;
   }
 
-  cfg_mgr->new->peers=trp_ptable_new(cfg_mgr);
+  cfg_mgr->new->peers=trp_ptable_new(cfg_mgr); /* not sure why this isn't in cfg_mgr->new's context */
 
   /* Parse configuration information from each config file */
   for (ii=0; ii<n; ii++) {
index 10bb2c3..f6c0836 100644 (file)
@@ -139,6 +139,7 @@ TR_IDP_REALM *tr_idp_realm_new(TALLOC_CTX *mem_ctx)
     idp->aaa_servers=NULL;
     idp->apcs=NULL;
     idp->origin=TR_REALM_LOCAL;
+    idp->refcount=0;
     talloc_set_destructor((void *)idp, tr_idp_realm_destructor);
   }
   return idp;