Fix directory leak in recurse_dir() on error
authorJens Axboe <axboe@fb.com>
Fri, 11 Apr 2014 17:24:00 +0000 (11:24 -0600)
committerJens Axboe <axboe@fb.com>
Fri, 11 Apr 2014 17:24:00 +0000 (11:24 -0600)
Signed-off-by: Jens Axboe <axboe@fb.com>
filesetup.c

index 1c529792afc952defb9f1422b8d1a953846b3f95..6d46ca3c5e1e33caa028960296e450c1757711e6 100644 (file)
@@ -1402,7 +1402,8 @@ static int recurse_dir(struct thread_data *td, const char *dirname)
                if (lstat(full_path, &sb) == -1) {
                        if (errno != ENOENT) {
                                td_verror(td, errno, "stat");
-                               return 1;
+                               ret = 1;
+                               break;
                        }
                }