LibC: Don't leak fds on rename

This commit is contained in:
Bananymous 2025-08-26 15:26:20 +03:00
parent 32afa33a06
commit 9854691265
1 changed files with 3 additions and 0 deletions

View File

@ -857,6 +857,9 @@ int rename(const char* old, const char* _new)
}
}
close(new_fd);
close(old_fd);
unlink(old);
return 0;