mirror of
https://review.haiku-os.org/haiku
synced 2025-01-18 04:28:52 +01:00
kernel/fs: Add missing frees to I/O context destruction.
Fixes a memory leak regression from 12d6ecf0df
.
This commit is contained in:
parent
3f35917df2
commit
6d6a53f147
@ -3657,6 +3657,9 @@ free_io_context(io_context* context)
|
||||
rw_lock_destroy(&context->lock);
|
||||
|
||||
remove_node_monitors(context);
|
||||
|
||||
free(context->fds_close_on_exec);
|
||||
free(context->select_infos);
|
||||
free(context->fds);
|
||||
free(context);
|
||||
|
||||
@ -5036,7 +5039,7 @@ vfs_resize_fd_table(struct io_context* context, uint32 newSize)
|
||||
// If the tables shrink, make sure none of the fds being dropped are in use.
|
||||
if (newSize < oldSize) {
|
||||
for (uint32 i = oldSize; i-- > newSize;) {
|
||||
if (context->fds[i])
|
||||
if (context->fds[i] != NULL)
|
||||
return B_BUSY;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user