]> www.infradead.org Git - mtd-utils.git/commitdiff
fs-tests: fix rename bug in integrity test
authorAdrian Hunter <ext-adrian.hunter@nokia.com>
Tue, 17 Jun 2008 10:54:23 +0000 (13:54 +0300)
committerAdrian Hunter <ext-adrian.hunter@nokia.com>
Tue, 17 Jun 2008 10:54:23 +0000 (13:54 +0300)
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
tests/fs-tests/integrity/integck.c

index 4009c2a2cd3322049a9b0a2a8e2681d42e878934..f1a544ab266e2c59f19b7dfcadcb582de316719e 100644 (file)
@@ -1537,12 +1537,16 @@ static void rename_entry(struct dir_entry_info *entry)
                                free(path);
                                free(name);
                                free(to);
+                               path = NULL;
                                continue;
                        }
                }
                break;
        }
 
+       if (!path)
+               return;
+
        ret = rename(path, to);
        if (ret == -1) {
                if (errno == ENOSPC)