1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

Fix fsm_mountat(2) error handling.

This commit is contained in:
Jonas 'Sortie' Termansen 2016-01-27 21:24:20 +01:00
parent 230fade468
commit b0bbf1e013

View file

@ -1138,6 +1138,8 @@ int sys_fsm_mountat(int dirfd, const char* path, const struct stat* rootst, int
return delete[] pathcopy, -1;
Ref<Descriptor> desc = from->fsm_mount(&ctx, pathcopy, rootst, flags);
delete[] pathcopy;
if ( !desc )
return -1;
Ref<DescriptorTable> dtable = CurrentProcess()->GetDTable();
int ret = dtable->Allocate(desc, fdflags);
if ( ret < 0 )