tree ae9c557262678328cad49d96aa4b8a879a3a911d
parent 3b88775c7504dfdedd5f267cb8f02999e380222a
author Joern Engel <[EMAIL PROTECTED]> Wed, 23 Feb 2005 19:37:11 +0000
committer Thomas Gleixner <[EMAIL PROTECTED]> Mon, 23 May 2005 12:43:32 +0200

[MTD] Use after free, found by the Coverity tool

Signed-off-by: Alexander Nyberg <[EMAIL PROTECTED]>
Signed-off-by: Joern Engel <[EMAIL PROTECTED]>
Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>

 drivers/mtd/devices/phram.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c
--- a/drivers/mtd/devices/phram.c
+++ b/drivers/mtd/devices/phram.c
@@ -1,5 +1,5 @@
 /**
- * $Id: phram.c,v 1.11 2005/01/05 18:05:13 dwmw2 Exp $
+ * $Id: phram.c,v 1.12 2005/02/23 19:37:07 joern Exp $
  *
  * Copyright (c) ????          Jochen Sch�uble <[EMAIL PROTECTED]>
  * Copyright (c) 2003-2004     J�rn Engel <[EMAIL PROTECTED]>
@@ -107,9 +107,9 @@ static int phram_write(struct mtd_info *
 
 static void unregister_devices(void)
 {
-       struct phram_mtd_list *this;
+       struct phram_mtd_list *this, *safe;
 
-       list_for_each_entry(this, &phram_list, list) {
+       list_for_each_entry_safe(this, safe, &phram_list, list) {
                del_mtd_device(&this->mtd);
                iounmap(this->mtd.priv);
                kfree(this);
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to