LibC: Don't leak fds on rename
This commit is contained in:
parent
32afa33a06
commit
9854691265
|
@ -857,6 +857,9 @@ int rename(const char* old, const char* _new)
|
|||
}
|
||||
}
|
||||
|
||||
close(new_fd);
|
||||
close(old_fd);
|
||||
|
||||
unlink(old);
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue