From: Michael Brown Date: Sat, 19 May 2007 22:05:16 +0000 (+0000) Subject: Use list_for_each_entry_safe() when flushing queue. X-Git-Tag: v0.9.3~405 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54138f28f639700f48567847b56a6ddaf872d959;p=thirdparty%2Fipxe.git Use list_for_each_entry_safe() when flushing queue. --- diff --git a/src/core/posix_io.c b/src/core/posix_io.c index a8876b732..b98766f8d 100644 --- a/src/core/posix_io.c +++ b/src/core/posix_io.c @@ -75,8 +75,9 @@ static void posix_file_free ( struct refcnt *refcnt ) { struct posix_file *file = container_of ( refcnt, struct posix_file, refcnt ); struct io_buffer *iobuf; + struct io_buffer *tmp; - list_for_each_entry ( iobuf, &file->data, list ) { + list_for_each_entry_safe ( iobuf, tmp, &file->data, list ) { free_iob ( iobuf ); } free ( file );