瀏覽代碼

[ulog]Fix the problem of file_buf being released incorrectly

Rbb666 2 月之前
父節點
當前提交
91beec4239
共有 1 個文件被更改,包括 1 次插入1 次删除
  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;