Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/dfs/dfs_v1/filesystems/elmfat/dfs_elm.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ int dfs_elm_mkfs(rt_device_t dev_id, const char *fs_name)
/* check flag status, we need clear the temp driver stored in disk[] */
if (flag == FSM_STATUS_USE_TEMP_DRIVER)
{
rt_free(fat);
f_mount(RT_NULL, logic_nbr, (BYTE)index);
rt_free(fat);
disk[index] = RT_NULL;
/* close device */
rt_device_close(dev_id);
Expand Down
2 changes: 1 addition & 1 deletion components/dfs/dfs_v2/filesystems/elmfat/dfs_elm.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,8 @@ int dfs_elm_mkfs(rt_device_t dev_id, const char *fs_name)
/* check flag status, we need clear the temp driver stored in disk[] */
if (flag == FSM_STATUS_USE_TEMP_DRIVER)
{
rt_free(fat);
f_mount(RT_NULL, logic_nbr, (BYTE)index);
rt_free(fat);
disk[index] = RT_NULL;
/* close device */
rt_device_close(dev_id);
Expand Down
6 changes: 3 additions & 3 deletions components/libc/posix/pthreads/pthread.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,6 @@ void _pthread_data_destroy(_pthread_data_t *ptd)
/* clean magic */
ptd->magic = 0x0;

/* clear the "ptd->tid->pthread_data" */
ptd->tid->pthread_data = RT_NULL;

/* free ptd */
rt_free(ptd);
}
Expand All @@ -185,6 +182,9 @@ static void _pthread_cleanup(rt_thread_t tid)
/* restore tid stack */
rt_free(tid->stack_addr);

/* clear the "ptd->tid->pthread_data" */
tid->pthread_data = RT_NULL;

/* restore tid control block */
rt_free(tid);
}
Expand Down