From 836d30a46c8ded7575c24d08f223771aee5f8d6b Mon Sep 17 00:00:00 2001 From: Andrew Pamment Date: Wed, 21 Feb 2018 09:59:26 +1000 Subject: [PATCH] Some tweaks to file areas --- src/www.c | 3 +++ src/www_files.c | 5 +---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/www.c b/src/www.c index 8e5dd4d..dfcc3b5 100644 --- a/src/www.c +++ b/src/www.c @@ -945,7 +945,10 @@ int www_handler(void * cls, struct MHD_Connection * connection, const char * url free(header); free(footer); return MHD_YES; + } else { + free(filen); } + } else { free(filen); } } diff --git a/src/www_files.c b/src/www_files.c index f14626a..f5fa0a3 100644 --- a/src/www_files.c +++ b/src/www_files.c @@ -174,7 +174,6 @@ char *www_decode_hash(char *hash) { snprintf(buffer, PATH_MAX, "%s/%s.sq3", conf.bbs_path, conf.file_directories[dir]->file_subs[sub]->database); rc = sqlite3_open(buffer, &db); if (rc != SQLITE_OK) { - dolog("Cannot open database: %s", sqlite3_errmsg(db)); return NULL; } sqlite3_busy_timeout(db, 5000); @@ -262,7 +261,6 @@ char *www_files_display_listing(int dir, int sub) { rc = sqlite3_open(buffer, &db); if (rc != SQLITE_OK) { - dolog_www("Cannot open database: %s", sqlite3_errmsg(db)); free(page); return NULL; } @@ -315,7 +313,7 @@ char *www_files_display_listing(int dir, int sub) { strcat(page, buffer); len += strlen(buffer); - description = www_sanitize((char *)sqlite3_column_text(res, 2)); + description = strdup((char *)sqlite3_column_text(res, 2)); for (i=0;i