提交 549ac3d1 编写于 作者: M Michal Privoznik

virSecurityManagerNewStack: Don't ignore virSecurityStackAddNested retval

The virSecurityStackAddNested() can fail in which case
virSecurityManagerNewStack() should fail too.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
上级 c060e400
......@@ -117,9 +117,13 @@ virSecurityManagerNewStack(virSecurityManagerPtr primary)
if (!mgr)
return NULL;
virSecurityStackAddNested(mgr, primary);
if (virSecurityStackAddNested(mgr, primary) < 0)
goto error;
return mgr;
error:
virObjectUnref(mgr);
return NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册