Fix svace issues in mtd and testcases for filesystem.
fs_main.c
- The handle 'dirp' was created at fs_main.c:629 by calling function 'opendir' and lost at fs_main.c:631.
- The handle 'ret' was created at fs_main.c:392 by calling function 'dup' and lost at fs_main.c:393.
- Handler 'fd' is passed to a function at fs_main.c:489 by calling function 'close' after the handler is closed again at fs_main.c:485 by calling function 'close'.
- The handle 'fd1' was created at fs_main.c:447 by calling function 'dup2' and lost at fs_main.c:449.
- The handle 'dirp' was created at fs_main.c:818 by calling function 'opendir' and lost at fs_main.c:819.
mtd_partition.c
- Use of vulerable function 'strcpy' at mtd_partition.c:572. This function is unsafe, use strncpy instead.