Просмотр исходного кода

Use list_for_each_entry_safe() when flushing queue.

tags/v0.9.3
Michael Brown 17 лет назад
Родитель
Сommit
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 );

Загрузка…
Отмена
Сохранить