libcontainer: intelrdt: add missing destroy handler in defer func

In the exception handling of initProcess.start(), we need to add the
missing IntelRdtManager.Destroy() handler in defer func.

Signed-off-by: Xiaochen Shen <xiaochen.shen@intel.com>
This commit is contained in:
Xiaochen Shen 2019-04-24 16:41:51 +08:00
parent 029124da7a
commit 17b37ea3fa
1 changed files with 3 additions and 0 deletions

View File

@ -337,6 +337,9 @@ func (p *initProcess) start() error {
if err != nil {
// TODO: should not be the responsibility to call here
p.manager.Destroy()
if p.intelRdtManager != nil {
p.intelRdtManager.Destroy()
}
}
}()
if err := p.createNetworkInterfaces(); err != nil {