]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Allocate the subsection if it doesn't exist instead of failing
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 6 Mar 2013 18:58:20 +0000 (13:58 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 6 Mar 2013 20:08:22 +0000 (15:08 -0500)
src/modules/rlm_sql/rlm_sql.c

index 7549706196fdf80353474e7ae419ccdccbdde112..3c58503f99f425d1c18c068e882a39009a1a872c 100644 (file)
@@ -946,10 +946,10 @@ static int rlm_sql_instantiate(CONF_SECTION *conf, void **instance)
                
                cs = cf_section_sub_find(conf, name);
                if (!cs) {
-                       radlog(L_ERR, "%s driver requires %s driver subsection",
-                              inst->config->sql_driver_name, name);
-                              
-                        return -1;
+                       cs = cf_section_alloc(conf, name, NULL);
+                       if (!cs) {
+                               return -1;
+                       }
                }
                
                /*