Browse Source

[ulog]Fix the problem of file_buf being released incorrectly

Rbb666 2 months ago
parent
commit
91beec4239
1 changed files with 1 additions and 1 deletions
  1. 1 1
      components/utilities/ulog/backend/file_be.c

+ 1 - 1
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;