Example code: Don't create rs_error on failing context creation.
[radsecproxy.git] / catgconf.c
index dc0f312..650a0e9 100644 (file)
@@ -6,16 +6,18 @@
 #include "gconfig.h"
 
 void listconfig(struct gconffile **cf, char *block, int compact) {
-    char *opt, *val;
+    char *opt = NULL, *val = NULL;
     int conftype;
 
     for (;;) {
+       free(opt);
+       free(val);
        getconfigline(cf, block, &opt, &val, &conftype);
        if (!opt)
            return;
 
        if (conftype == CONF_STR && !strcasecmp(opt, "include")) {
-           if (!pushgconffiles(cf, val))
+           if (!pushgconfpaths(cf, val))
                debugx(1, DBG_ERR, "failed to include config file %s", val);
            continue;
        }
@@ -65,3 +67,7 @@ usage:
     debug(DBG_ERR, "Usage:\n%s [ -c ] configfile", argv[0]);
     exit(1);
 }
+
+/* Local Variables: */
+/* c-file-style: "stroustrup" */
+/* End: */