diff --git a/drivers/crypto/dev_urandom.c b/drivers/crypto/dev_urandom.c index 47569de06c..b6c6efda87 100644 --- a/drivers/crypto/dev_urandom.c +++ b/drivers/crypto/dev_urandom.c @@ -37,6 +37,7 @@ #include #include +#include #include #include #include diff --git a/drivers/net/telnet.c b/drivers/net/telnet.c index 9b0f0209c0..b86f35544a 100644 --- a/drivers/net/telnet.c +++ b/drivers/net/telnet.c @@ -720,7 +720,7 @@ static int telnet_close(FAR struct file *filep) } } - kmm_free(devpath); + lib_free(devpath); } for (i = 0; i < CONFIG_TELNET_MAXLCLIENTS; i++) diff --git a/drivers/wireless/gs2200m.c b/drivers/wireless/gs2200m.c index adafa80a4f..daec124ef8 100644 --- a/drivers/wireless/gs2200m.c +++ b/drivers/wireless/gs2200m.c @@ -3542,7 +3542,7 @@ FAR void *gs2200m_register(FAR const char *devpath, errout: nxmutex_destroy(&dev->dev_lock); - kmm_free(dev->path); + lib_free(dev->path); kmm_free(dev); return NULL; } diff --git a/fs/inode/fs_inodesearch.c b/fs/inode/fs_inodesearch.c index 19905681f1..553c143f3b 100644 --- a/fs/inode/fs_inodesearch.c +++ b/fs/inode/fs_inodesearch.c @@ -358,7 +358,7 @@ static int _inode_search(FAR struct inode_search_s *desc) name); if (ret > 0) { - kmm_free(desc->buffer); + lib_free(desc->buffer); desc->buffer = buffer; relpath = buffer; ret = OK; diff --git a/fs/inode/inode.h b/fs/inode/inode.h index 76e0c1e788..6ad3e62475 100644 --- a/fs/inode/inode.h +++ b/fs/inode/inode.h @@ -35,6 +35,7 @@ #include #include +#include /**************************************************************************** * Pre-processor Definitions @@ -58,7 +59,7 @@ { \ if ((d)->buffer != NULL) \ { \ - kmm_free((d)->buffer); \ + lib_free((d)->buffer); \ (d)->buffer = NULL; \ } \ } \ diff --git a/fs/unionfs/fs_unionfs.c b/fs/unionfs/fs_unionfs.c index df693a99d7..53a726840c 100644 --- a/fs/unionfs/fs_unionfs.c +++ b/fs/unionfs/fs_unionfs.c @@ -1770,7 +1770,7 @@ static int unionfs_readdir(FAR struct inode *mountpt, /* Free the allocated relpath */ - kmm_free(relpath); + lib_free(relpath); /* Check for a duplicate */ @@ -1857,7 +1857,7 @@ static int unionfs_readdir(FAR struct inode *mountpt, /* Free the allocated relpath */ - kmm_free(relpath); + lib_free(relpath); } } } diff --git a/fs/vfs/fs_dir.c b/fs/vfs/fs_dir.c index 78f90d1dca..fc78f619fe 100644 --- a/fs/vfs/fs_dir.c +++ b/fs/vfs/fs_dir.c @@ -453,7 +453,7 @@ static int dir_close(FAR struct file *filep) /* Release our references on the contained 'root' inode */ inode_release(inode); - kmm_free(relpath); + lib_free(relpath); return ret; } diff --git a/fs/vfs/fs_fdopen.c b/fs/vfs/fs_fdopen.c index f4f4d4ce6f..5f7bf7005a 100644 --- a/fs/vfs/fs_fdopen.c +++ b/fs/vfs/fs_fdopen.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include "inode/inode.h" diff --git a/fs/vfs/fs_rename.c b/fs/vfs/fs_rename.c index 745ebd50fe..d7dfab2b03 100644 --- a/fs/vfs/fs_rename.c +++ b/fs/vfs/fs_rename.c @@ -245,7 +245,7 @@ errout: RELEASE_SEARCH(&newdesc); if (subdir != NULL) { - kmm_free(subdir); + lib_free(subdir); } return ret; @@ -431,7 +431,7 @@ errout_with_newsearch: RELEASE_SEARCH(&newdesc); if (subdir != NULL) { - kmm_free(subdir); + lib_free(subdir); } return ret;