diff options
Diffstat (limited to '')
-rw-r--r-- | src/sledjchisl/sledjchisl.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c index e30cb47..d6c7730 100644 --- a/src/sledjchisl/sledjchisl.c +++ b/src/sledjchisl/sledjchisl.c | |||
@@ -5702,7 +5702,8 @@ void account_html(char *file, reqData *Rd, HTMLfile *thisFile) | |||
5702 | 5702 | ||
5703 | static void cleanup(void) | 5703 | static void cleanup(void) |
5704 | { | 5704 | { |
5705 | C("Caught signal, cleaning up."); | 5705 | // TODO - not sure why, but this gets called twice on quitting. |
5706 | C("Caught signal, or quitting, cleaning up."); | ||
5706 | dbRequest *req = NULL; | 5707 | dbRequest *req = NULL; |
5707 | 5708 | ||
5708 | while (NULL != (req = (dbRequest *) dbRequests->getat(dbRequests, 0, NULL, false))) | 5709 | while (NULL != (req = (dbRequest *) dbRequests->getat(dbRequests, 0, NULL, false))) |
@@ -5736,11 +5737,13 @@ static void cleanup(void) | |||
5736 | } | 5737 | } |
5737 | accountPages->unlock(accountPages); | 5738 | accountPages->unlock(accountPages); |
5738 | accountPages->free(accountPages); | 5739 | accountPages->free(accountPages); |
5740 | accountPages = NULL; | ||
5739 | } | 5741 | } |
5740 | 5742 | ||
5741 | // if (fieldValidFuncs) fieldValidFuncs->free(fieldValidFuncs); | 5743 | // if (fieldValidFuncs) fieldValidFuncs->free(fieldValidFuncs); |
5742 | // if (buildPages) buildPages->free(buildPages); | 5744 | // if (buildPages) buildPages->free(buildPages); |
5743 | if (dynPages) dynPages->free(dynPages); | 5745 | if (dynPages) dynPages->free(dynPages); |
5746 | dynPages = NULL; | ||
5744 | if (HTMLfileCache) | 5747 | if (HTMLfileCache) |
5745 | { | 5748 | { |
5746 | qhashtbl_obj_t obj; | 5749 | qhashtbl_obj_t obj; |
@@ -5757,14 +5760,18 @@ static void cleanup(void) | |||
5757 | HTMLfileCache->free(HTMLfileCache); | 5760 | HTMLfileCache->free(HTMLfileCache); |
5758 | } | 5761 | } |
5759 | if (mimeTypes) mimeTypes->free(mimeTypes); | 5762 | if (mimeTypes) mimeTypes->free(mimeTypes); |
5763 | mimeTypes = NULL; | ||
5760 | if (dbRequests) dbRequests->free(dbRequests); | 5764 | if (dbRequests) dbRequests->free(dbRequests); |
5765 | dbRequests = NULL; | ||
5761 | if (database) mysql_close(database); | 5766 | if (database) mysql_close(database); |
5767 | database = NULL; | ||
5762 | mysql_library_end(); | 5768 | mysql_library_end(); |
5763 | lua_close(L); | 5769 | lua_close(L); |
5764 | if (stats) | 5770 | if (stats) |
5765 | { | 5771 | { |
5766 | if (stats->stats) stats->stats->free(stats->stats); | 5772 | if (stats->stats) stats->stats->free(stats->stats); |
5767 | free(stats); | 5773 | free(stats); |
5774 | stats = NULL; | ||
5768 | } | 5775 | } |
5769 | if (configs) configs->free(configs); | 5776 | if (configs) configs->free(configs); |
5770 | } | 5777 | } |