]> git.ipfire.org Git - thirdparty/libvirt.git/commit
libxl: Avoid possible use of uninitialized mem in libxlDomainStart
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 2 Jun 2014 10:53:03 +0000 (11:53 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 3 Jun 2014 10:45:59 +0000 (11:45 +0100)
commit10a99a6d130b2266fa9b42073aad977abd7418c5
tree50a7fd0c7092b0303c81e2a32cc8fdf31e57c9dc
parent3bab69c30f53f06e0e139f307caba4ab9999f9d4
libxl: Avoid possible use of uninitialized mem in libxlDomainStart

The 'libxl_domain_config' object is stack allocated which means its
memory contents are undefined. The libxl_domain_config_dispose() call
is only safe if the memory is initialized to a defined state. Not all
code paths which reach libxl_domain_config_dispose() will ensure that
libxl_domain_config_init() is called. Move the libxl_domain_config_init()
call earlier in the function to ensure all codepaths have defined
memory state.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/libxl/libxl_domain.c