You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by bt...@apache.org on 2020/04/30 08:04:44 UTC

[incubator-nuttx] 01/02: tmpfs: Fix tmpfs_foreach recursively removing files in directories

This is an automated email from the ASF dual-hosted git repository.

btashton pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 1dcf2c7ca302200017d19bce368e9f83ee621075
Author: Oxore <ox...@protonmail.com>
AuthorDate: Thu Apr 30 09:23:09 2020 +0300

    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 43fb0fc..915ccb6 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;