From 1dcf2c7ca302200017d19bce368e9f83ee621075 Mon Sep 17 00:00:00 2001 From: Oxore Date: Thu, 30 Apr 2020 09:23:09 +0300 Subject: [PATCH] tmpfs: Fix tmpfs_foreach recursively removing files in directories Fixes #912 --- fs/tmpfs/fs_tmpfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/tmpfs/fs_tmpfs.c b/fs/tmpfs/fs_tmpfs.c index 43fb0fc081c..915ccb6aece 100644 --- a/fs/tmpfs/fs_tmpfs.c +++ b/fs/tmpfs/fs_tmpfs.c @@ -1322,7 +1322,7 @@ static int tmpfs_foreach(FAR struct tmpfs_directory_s *tdo, * action will be to delete the directory. */ - ret = tmpfs_foreach(next, tmpfs_free_callout, NULL); + ret = tmpfs_foreach(next, callout, arg); if (ret < 0) { return -ECANCELED;