From: Alan T. DeKok Date: Sun, 17 Feb 2013 20:37:32 +0000 (-0500) Subject: Check pointers before using them X-Git-Tag: release_3_0_0_beta1~1062 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ce5c62d41dd921e83deeb7cf4bab3849722636a;p=thirdparty%2Ffreeradius-server.git Check pointers before using them --- diff --git a/src/modules/rlm_sql/rlm_sql.c b/src/modules/rlm_sql/rlm_sql.c index 07e4228060d..a068c25081d 100644 --- a/src/modules/rlm_sql/rlm_sql.c +++ b/src/modules/rlm_sql/rlm_sql.c @@ -761,12 +761,12 @@ static int rlm_sql_detach(void *instance) paircompare_unregister(PW_SQL_GROUP, sql_groupcmp); - if (inst->config->postauth) free(inst->config->postauth); - if (inst->config->accounting) free(inst->config->accounting); - if (inst->config) { int i; + if (inst->config->postauth) free(inst->config->postauth); + if (inst->config->accounting) free(inst->config->accounting); + if (inst->pool) sql_poolfree(inst); if (inst->config->xlat_name) {