mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-08 22:15:21 +00:00
virSecurityManagerNewStack: Don't ignore virSecurityStackAddNested retval
The virSecurityStackAddNested() can fail in which case virSecurityManagerNewStack() should fail too. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
c060e400d9
commit
549ac3d142
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user