diff --git a/components/dfs/src/dfs.c b/components/dfs/src/dfs.c index 18eb41bf10a0b158431e038ad54187ef38b60aa5..eaf865031084d7fb55b34aa45db98e685ffb89b2 100644 --- a/components/dfs/src/dfs.c +++ b/components/dfs/src/dfs.c @@ -297,6 +297,8 @@ char* dfs_normalize_path(const char* directory, const char* filename) src = fullpath; dst = fullpath; + + dst0 = dst; while (1) { char c = *src; diff --git a/components/dfs/src/dfs_file.c b/components/dfs/src/dfs_file.c index fc63920d567e495cd97a4215833b886856e54e38..58d57ea3dac50ac49a04790371cd7cc899a69422 100644 --- a/components/dfs/src/dfs_file.c +++ b/components/dfs/src/dfs_file.c @@ -385,6 +385,7 @@ int dfs_file_rename(const char* oldpath, const char* newpath) char *oldfullpath, *newfullpath; result = DFS_STATUS_OK; + newfullpath = RT_NULL; oldfullpath = dfs_normalize_path(RT_NULL, oldpath); if ( oldfullpath == RT_NULL )