Add already opened file logic

This commit is contained in:
li_zan 2021-05-08 11:31:27 +08:00
parent 49e9044529
commit 4aeaf030a2
1 changed files with 1 additions and 0 deletions

View File

@ -289,6 +289,7 @@ int LfsClose(int fd)
g_handle[fd].useFlag = 0; g_handle[fd].useFlag = 0;
if (g_handle[fd].pathName != NULL) { if (g_handle[fd].pathName != NULL) {
free(g_handle[fd].pathName); free(g_handle[fd].pathName);
g_handle[fd].pathName = NULL;
} }
pthread_mutex_unlock(&g_FslocalMutex); pthread_mutex_unlock(&g_FslocalMutex);