]> xenbits.xensource.com Git - libvirt.git/commit
virSecurityDeviceLabelDefNew: Avoid NULL dereference
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 30 Mar 2020 08:56:46 +0000 (10:56 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 30 Mar 2020 14:14:23 +0000 (16:14 +0200)
commit9c8753fe2fb3d7083e8cd1858765996c7bec6185
treec496f0b1f4f99aba0e197239c29e446b96427962
parentef4719ac17081e5e5fda6932334bb10f76b01ace
virSecurityDeviceLabelDefNew: Avoid NULL dereference

While it is impossible for VIR_ALLOC() to return an error, we
should be consistent with the rest of the code and not continue
initializing the virSecurityDeviceLabelDef structure.

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