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