Parcourir la source

Use list_for_each_entry_safe() when flushing queue.

tags/v0.9.3
Michael Brown il y a 17 ans
Parent
révision
54138f28f6
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2
    1
      src/core/posix_io.c

+ 2
- 1
src/core/posix_io.c Voir le fichier

@@ -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 );

Chargement…
Annuler
Enregistrer