mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Don't leak vfs.MountNamespace reference if kernel.TaskSet.NewTask fails.
PiperOrigin-RevId: 308617610
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user