]> jfr.im git - irc/quakenet/newserv.git/blobdiff - control/control_db.c
Terminate newserv when the noperserv database schema is out of date.
[irc/quakenet/newserv.git] / control / control_db.c
index d0316c003fa73fac2da81d9e313f82b0a7f3092a..3aaee5243b1c6d32bc337a136eb6ce60b8090c3d 100644 (file)
@@ -50,7 +50,7 @@ void noperserv_load_users(const DBAPIResult *res, void *arg) {
   no_autheduser *nu;
 
   if(!res)
-    return;
+    Error("control", ERR_STOP, "Failed to load noperserv database. Your database might be corrupted or the schema is incompatible.");
 
   if(!res->success) {
     Error("noperserv", ERR_ERROR, "Error loading user list.");
@@ -143,7 +143,9 @@ void noperserv_update_autheduser(no_autheduser *au) {
 }
 
 void noperserv_free_user(no_autheduser *au) {
-  au->authname->exts[noperserv_ext] = NULL;
+  authname *anp = au->authname;
+  anp->exts[noperserv_ext] = NULL;
+  releaseauthname(anp);
   free(au);
 
   loadedusers--;