Closes Coverity #63
We don't need to check for "cs->section_tree" twice. Just check for it
once, and if we can't allocate it, die. Checking a second time is
pointless.
if (!cs->section_tree) {
cs->section_tree = rbtree_create(section_cmp, NULL, 0);
- /* ignore any errors */
+ if (!cs->section_tree) {
+ radlog(L_ERR, "Out of memory");
+ _exit(1);
+ }
}
- if (cs->section_tree) {
- rbtree_insert(cs->section_tree, cs_new); }
+ rbtree_insert(cs->section_tree, cs_new);
/*
* Two names: find the named instance.