Add already opened file logic
This commit is contained in:
parent
94c0727e1d
commit
49e9044529
|
@ -287,6 +287,9 @@ int LfsClose(int fd)
|
||||||
ret = lfs_file_close(&g_lfs, &(g_handle[fd].file));
|
ret = lfs_file_close(&g_lfs, &(g_handle[fd].file));
|
||||||
pthread_mutex_lock(&g_FslocalMutex);
|
pthread_mutex_lock(&g_FslocalMutex);
|
||||||
g_handle[fd].useFlag = 0;
|
g_handle[fd].useFlag = 0;
|
||||||
|
if (g_handle[fd].pathName != NULL) {
|
||||||
|
free(g_handle[fd].pathName);
|
||||||
|
}
|
||||||
pthread_mutex_unlock(&g_FslocalMutex);
|
pthread_mutex_unlock(&g_FslocalMutex);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue