Browse Source

Use list_for_each_entry_safe() when flushing queue.

tags/v0.9.3
Michael Brown 17 years ago
parent
commit
54138f28f6
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      src/core/posix_io.c

+ 2
- 1
src/core/posix_io.c View File

@@ -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…
Cancel
Save