Fix fsm_mountat(2) error handling.
This commit is contained in:
parent
230fade468
commit
b0bbf1e013
|
@ -1138,6 +1138,8 @@ int sys_fsm_mountat(int dirfd, const char* path, const struct stat* rootst, int
|
||||||
return delete[] pathcopy, -1;
|
return delete[] pathcopy, -1;
|
||||||
Ref<Descriptor> desc = from->fsm_mount(&ctx, pathcopy, rootst, flags);
|
Ref<Descriptor> desc = from->fsm_mount(&ctx, pathcopy, rootst, flags);
|
||||||
delete[] pathcopy;
|
delete[] pathcopy;
|
||||||
|
if ( !desc )
|
||||||
|
return -1;
|
||||||
Ref<DescriptorTable> dtable = CurrentProcess()->GetDTable();
|
Ref<DescriptorTable> dtable = CurrentProcess()->GetDTable();
|
||||||
int ret = dtable->Allocate(desc, fdflags);
|
int ret = dtable->Allocate(desc, fdflags);
|
||||||
if ( ret < 0 )
|
if ( ret < 0 )
|
||||||
|
|
Loading…
Reference in New Issue