From: Alan T. DeKok Date: Mon, 18 Feb 2013 19:02:15 +0000 (-0500) Subject: No longer need to free conf file stuff manually. X-Git-Tag: release_3_0_0_beta1~1037 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eef14e1e6dd68bff87bdd1d31650ceaa8f016d95;p=thirdparty%2Ffreeradius-server.git No longer need to free conf file stuff manually. --- diff --git a/src/modules/rlm_sql/rlm_sql.c b/src/modules/rlm_sql/rlm_sql.c index ce78623a7eb..3e6ed6f1405 100644 --- a/src/modules/rlm_sql/rlm_sql.c +++ b/src/modules/rlm_sql/rlm_sql.c @@ -762,8 +762,6 @@ static int rlm_sql_detach(void *instance) paircompare_unregister(PW_SQL_GROUP, sql_groupcmp); if (inst->config) { - int i; - if (inst->config->postauth) free(inst->config->postauth); if (inst->config->accounting) free(inst->config->accounting); @@ -774,28 +772,6 @@ static int rlm_sql_detach(void *instance) rad_cfree(inst->config->xlat_name); } - /* - * Free up dynamically allocated string pointers. - */ - for (i = 0; module_config[i].name != NULL; i++) { - char **p; - if (module_config[i].type != PW_TYPE_STRING_PTR) { - continue; - } - - /* - * Treat 'config' as an opaque array of bytes, - * and take the offset into it. There's a - * (char*) pointer at that offset, and we want - * to point to it. - */ - p = (char **) (((char *)inst->config) + module_config[i].offset); - if (!*p) { /* nothing allocated */ - continue; - } - free(*p); - *p = NULL; - } free(inst->config); inst->config = NULL; }