diff --git a/libretro-common/include/lists/file_list.h b/libretro-common/include/lists/file_list.h index 95b0eb5d2c..67d3875fc9 100644 --- a/libretro-common/include/lists/file_list.h +++ b/libretro-common/include/lists/file_list.h @@ -59,6 +59,16 @@ void *file_list_get_userdata_at_offset(const file_list_t *list, void *file_list_get_actiondata_at_offset(const file_list_t *list, size_t index); +/** + * @brief frees the list + * + * NOTE: This function will also free() the entries actiondata + * and userdata fields if they are non-null. If you store complex + * or non-contiguous data there, make sure you free it's fields + * before calling this function or you might get a memory leak. + * + * @param list + */ void file_list_free(file_list_t *list); bool file_list_append(file_list_t *userdata, const char *path,