Don't leak vfs.MountNamespace reference if kernel.TaskSet.NewTask fails.
PiperOrigin-RevId: 308617610
This commit is contained in:
parent
3c67754663
commit
292f3f99b7
|
@ -104,6 +104,9 @@ func (ts *TaskSet) NewTask(cfg *TaskConfig) (*Task, error) {
|
|||
cfg.TaskContext.release()
|
||||
cfg.FSContext.DecRef()
|
||||
cfg.FDTable.DecRef()
|
||||
if cfg.MountNamespaceVFS2 != nil {
|
||||
cfg.MountNamespaceVFS2.DecRef()
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
return t, nil
|
||||
|
|
Loading…
Reference in New Issue