]> git.ipfire.org Git - thirdparty/libvirt.git/commit
vbox: Fix resource leak
authorJohn Ferlan <jferlan@redhat.com>
Tue, 5 Jun 2018 12:33:04 +0000 (08:33 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Mon, 11 Jun 2018 22:33:13 +0000 (18:33 -0400)
commit6cfd49bd4f3be82bdadd76b5d7407db42a761672
tree6486cc8f8d86e94fa56cf8bba226b406f9fa43eb
parentb8844727c904ebfc16c3d5312101b3f5ec5e264f
vbox: Fix resource leak

The @disk was allocated, filled in, and consumed on the normal path,
but for error/cleanup paths it would be leaked.  Rename to newHardDisk
and manage properly.

Found by Coverity

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Katerina Koukiou <kkoukiou@redhat.com>
src/vbox/vbox_common.c