Query may be an empty string, too.
authorAlan T. DeKok <aland@freeradius.org>
Tue, 6 May 2014 12:30:36 +0000 (08:30 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 6 May 2014 13:09:52 +0000 (09:09 -0400)
We should really fix that in the init function

src/modules/rlm_sql/sql.c

index 34ab8dd..fae7171 100644 (file)
@@ -86,7 +86,7 @@ static void *mod_conn_create(void *instance)
                return NULL;
        }
 
-       if (inst->config->open_query) {
+       if (inst->config->open_query && *inst->config->open_query) {
                if (rlm_sql_select_query(&handle, inst, inst->config->open_query)) {
                        goto fail;
                }