mirror of
https://github.com/pellepl/spiffs.git
synced 2026-09-18 23:20:04 +00:00
SPIFFS_rename leaks file descriptors #28
This commit is contained in:
@@ -711,9 +711,8 @@ s32_t SPIFFS_rename(spiffs *fs, char *old, char *new) {
|
||||
res = spiffs_object_update_index_hdr(fs, fd, fd->obj_id, fd->objix_hdr_pix, 0, (u8_t*)new,
|
||||
0, &pix_dummy);
|
||||
|
||||
if (res != SPIFFS_OK) {
|
||||
spiffs_fd_return(fs, fd->file_nbr);
|
||||
}
|
||||
spiffs_fd_return(fs, fd->file_nbr);
|
||||
|
||||
SPIFFS_API_CHECK_RES_UNLOCK(fs, res);
|
||||
|
||||
SPIFFS_UNLOCK(fs);
|
||||
|
||||
Reference in New Issue
Block a user