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
1 changed files with 2 additions and 0 deletions

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 )