+ logthing(LOGTHING_NOTICE,
+ "Couldn't open config file; using defaults.");
+ }
+}
+
+void cleanupconfig(void) {
+ if (config.thissite != NULL) {
+ free(config.thissite);
+ config.thissite = NULL;
+ }
+ if (config.adminemail != NULL) {
+ free(config.adminemail);
+ config.adminemail = NULL;
+ }
+ if (config.mta != NULL) {
+ free(config.mta);
+ config.mta = NULL;
+ }
+ if (config.db_dir != NULL) {
+ free(config.db_dir);
+ config.db_dir = NULL;
+ }
+ if (config.pg_dbhost != NULL) {
+ free(config.pg_dbhost);
+ config.pg_dbhost = NULL;
+ }
+ if (config.pg_dbname != NULL) {
+ free(config.pg_dbname);
+ config.pg_dbname = NULL;
+ }
+ if (config.pg_dbuser != NULL) {
+ free(config.pg_dbuser);
+ config.pg_dbuser = NULL;
+ }
+ if (config.pg_dbpass != NULL) {
+ free(config.pg_dbpass);
+ config.pg_dbpass = NULL;
+ }
+ if (config.syncsites != NULL) {
+ llfree(config.syncsites, free);
+ config.syncsites = NULL;
+ }
+ if (config.logfile != NULL) {
+ free(config.logfile);
+ config.logfile = NULL;
+ }
+ if (config.db_backend != NULL) {
+ free(config.db_backend);
+ config.db_backend = NULL;
+ }
+ if (config.backends_dir != NULL) {
+ free(config.backends_dir);
+ config.backends_dir = NULL;