summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorHanhui <hanhui@acoinfo.com>2021-08-19 06:00:48 (GMT)
committer Hanhui <hanhui@acoinfo.com>2021-08-19 06:00:48 (GMT)
commita2e81d09d00a94cace505fab7f2e294ac698975a (patch)
treeea196bdbfc31dad53ae452f4d239d8bd1daf3ba1
parent6d34953aa6bd99aba841e826daedcd36a92207e8 (diff)
downloadlibsylixos-a2e81d09d00a94cace505fab7f2e294ac698975a.zip
libsylixos-a2e81d09d00a94cace505fab7f2e294ac698975a.tar.gz
libsylixos-a2e81d09d00a94cace505fab7f2e294ac698975a.tar.bz2
Fixed ramfs lock and list error.
-rw-r--r--SylixOS/fs/ramFs/ramFs.c1
-rw-r--r--SylixOS/fs/ramFs/ramFsLib.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/SylixOS/fs/ramFs/ramFs.c b/SylixOS/fs/ramFs/ramFs.c
index 91a0e55..4c0b181 100644
--- a/SylixOS/fs/ramFs/ramFs.c
+++ b/SylixOS/fs/ramFs/ramFs.c
@@ -317,6 +317,7 @@ static LONG __ramFsOpen (PRAM_VOLUME pramfs,
goto __file_open_ok;
} else {
+ __RAMFS_VOL_UNLOCK(pramfs);
return (PX_ERROR);
}
}
diff --git a/SylixOS/fs/ramFs/ramFsLib.c b/SylixOS/fs/ramFs/ramFsLib.c
index 4ff4c9e..1baa03c 100644
--- a/SylixOS/fs/ramFs/ramFsLib.c
+++ b/SylixOS/fs/ramFs/ramFsLib.c
@@ -330,7 +330,7 @@ VOID __ram_truncate (PRAM_NODE pramn, size_t stOft)
plineTemp = _list_line_get_next(plineTemp);
_List_Line_Del(plineDel, &pramn->RAMN_plineBStart);
- __RAM_BFREE(plineTemp);
+ __RAM_BFREE(plineDel);
pramfs->RAMFS_ulCurBlk--;
pramn->RAMN_ulCnt--;
} while (plineTemp);