]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Fix crash on OOM parsing storage pool XML
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 25 Sep 2013 09:22:42 +0000 (10:22 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Wed, 25 Sep 2013 17:12:08 +0000 (18:12 +0100)
commit6b663b6fd1a5d7e80872792a762c8920d0936d32
tree0656d1b98cdee223e8944f5061089f644b8d951c
parent0dff76c2d3aea654420dd807d0cb5c7a90089325
Fix crash on OOM parsing storage pool XML

The virStoragePoolDefParseSource method would set def->nhosts
before allocating def->hosts. If the allocation failed due to
OOM, the cleanup code would crash accessing out of bounds.

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