From 91beec4239cd03f039daa89d78d89fcabfce1357 Mon Sep 17 00:00:00 2001 From: Rbb666 <64397326+Rbb666@users.noreply.github.com> Date: Tue, 18 Feb 2025 12:00:20 +0800 Subject: [PATCH] [ulog]Fix the problem of file_buf being released incorrectly --- components/utilities/ulog/backend/file_be.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/utilities/ulog/backend/file_be.c b/components/utilities/ulog/backend/file_be.c index a57f2c82a70..33660ddab5e 100644 --- a/components/utilities/ulog/backend/file_be.c +++ b/components/utilities/ulog/backend/file_be.c @@ -203,7 +203,7 @@ int ulog_file_backend_deinit(struct ulog_file_be *be) be->cur_log_file_fd = -1; } - if (!be->file_buf) + if (be->file_buf) { rt_free(be->file_buf); be->file_buf = RT_NULL;