]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Make virSecurityDeviceLabelDefParseXML into generic device <seclabel> parser.
authorRichard W.M. Jones <rjones@redhat.com>
Thu, 20 Sep 2012 13:58:12 +0000 (14:58 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Fri, 21 Sep 2012 12:43:32 +0000 (13:43 +0100)
commitdb2aff6adaa405f0bc998c7bd3158fe43805ee60
treefb56ead97b00f063d6c36bd1a276184f89e4030a
parent8125113cdb61bb4352af8e80e66573282be9cf83
Make virSecurityDeviceLabelDefParseXML into generic device <seclabel> parser.

This is just code motion, allowing us to reuse the same function to
parse the <seclabel> from character devices too.

However it also fixes a possible segfault in the original code if
VIR_ALLOC_N returns an error and the cleanup code (at the error:
label) tries to iterate over the unallocated array (thanks Michal
Privoznik for spotting this).

Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
src/conf/domain_conf.c