]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virDomainMomentAssignDef: Don't dereference a NULL pointer
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 22 Mar 2019 09:39:06 +0000 (10:39 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 22 Mar 2019 10:19:41 +0000 (11:19 +0100)
commit5e752513d802726de870be539178fe73029fda1e
tree638c990c0a877c34326369a9dce53ee704b8c22a
parent1193d9737b932621e3d067c2fec881224c593a48
virDomainMomentAssignDef: Don't dereference a NULL pointer

This functions tries to add a domain moment (love the name!) onto
a list of domain moments. Firstly, it checks if another moment
with the same name already exists. Then, it creates an empty
moment (without initializing its definition) and tries to add the
moment onto the list dereferencing moment definition in that
process. If it succeeds (which it never can), only after that it
sets moment->def.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/conf/virdomainmomentobjlist.c