소스 검색

Use list_for_each_entry_safe() when flushing queue.

tags/v0.9.3
Michael Brown 17 년 전
부모
커밋
54138f28f6
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2
    1
      src/core/posix_io.c

+ 2
- 1
src/core/posix_io.c 파일 보기

@@ -75,8 +75,9 @@ static void posix_file_free ( struct refcnt *refcnt ) {
75 75
 	struct posix_file *file =
76 76
 		container_of ( refcnt, struct posix_file, refcnt );
77 77
 	struct io_buffer *iobuf;
78
+	struct io_buffer *tmp;
78 79
 
79
-	list_for_each_entry ( iobuf, &file->data, list ) {
80
+	list_for_each_entry_safe ( iobuf, tmp, &file->data, list ) {
80 81
 		free_iob ( iobuf );
81 82
 	}
82 83
 	free ( file );

Loading…
취소
저장