mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 20:58:22 +00:00
syscalls: properly free the fd on an open failure
This commit is contained in:
@@ -80,7 +80,9 @@ syscallret syscall_open(const char* pathname, int flags, mode_t mode){
|
||||
|
||||
if(file)
|
||||
vfs_close(file);
|
||||
|
||||
fd_release(fd);
|
||||
fd_free(&proc->fdtable, fd);
|
||||
fd->node = NULL;
|
||||
free(name);
|
||||
return retv;
|
||||
|
||||
Reference in New Issue
Block a user