Fix for coverity (verify we parsed the proxy config section ok)
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 17 Feb 2013 17:53:50 +0000 (12:53 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 17 Feb 2013 17:53:50 +0000 (12:53 -0500)
src/main/realms.c

index e609c8e..fee9ab0 100644 (file)
@@ -1893,7 +1893,13 @@ int realms_init(CONF_SECTION *config)
 #ifdef WITH_PROXY
        cs = cf_subsection_find_next(config, NULL, "proxy");
        if (cs) {
-               cf_section_parse(cs, rc, proxy_config);
+               if (cf_section_parse(cs, rc, proxy_config) < 0) {
+                       radlog(L_ERR, "Failed parsing proxy section");
+                       
+                       free(rc);
+                       realms_free();
+                       return 0;
+               }
        } else {
                rc->dead_time = DEAD_TIME;
                rc->retry_count = RETRY_COUNT;