From 3564562563a474678090091f86bfc9f82b2d73df Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 29 Sep 2017 05:01:00 +0200 Subject: [PATCH] database_info.c - use malloc --- database_info.c | 5 ++++- libretro-common/include/file/archive_file.h | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/database_info.c b/database_info.c index 91247d686e..63d46b72b2 100644 --- a/database_info.c +++ b/database_info.c @@ -507,11 +507,14 @@ database_info_list_t *database_info_list_new( goto end; database_info_list = (database_info_list_t*) - calloc(1, sizeof(*database_info_list)); + malloc(sizeof(*database_info_list)); if (!database_info_list) goto end; + database_info_list->count = 0; + database_info_list->list = NULL; + while (ret != -1) { database_info_t db_info = {0}; diff --git a/libretro-common/include/file/archive_file.h b/libretro-common/include/file/archive_file.h index 8abe22116d..b2b5971931 100644 --- a/libretro-common/include/file/archive_file.h +++ b/libretro-common/include/file/archive_file.h @@ -60,13 +60,13 @@ typedef struct file_archive_file_data file_archive_file_data_t; typedef struct file_archive_transfer { + enum file_archive_transfer_type type; + int32_t archive_size; file_archive_file_data_t *handle; void *stream; const uint8_t *footer; const uint8_t *directory; const uint8_t *data; - int32_t archive_size; - enum file_archive_transfer_type type; const struct file_archive_file_backend *backend; } file_archive_transfer_t;