]> git.ipfire.org Git - thirdparty/libvirt.git/commit
openvz: fixed two memory leaks on migration code
authorHongbin Lu <hongbin034@gmail.com>
Tue, 16 Sep 2014 02:22:48 +0000 (22:22 -0400)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 16 Sep 2014 08:16:45 +0000 (10:16 +0200)
commite3c626a61d6c3d808555653684c0fb1e7c4d74ec
tree4f93df49bfe6811d003f0057970ac5f94653b35b
parent735a15a6b57e240b13019d1bce75984852540121
openvz: fixed two memory leaks on migration code

The first one occurs in openvzDomainMigratePrepare3Params() where in
case no remote uri is given, the distant hostname is used. The name is
obtained via virGetHostname() which require callers to free the
returned value.
The second leak lies in openvzDomainMigratePerform3Params(). There's a
virCommand used later. However, at the beginning of the function
virCheckFlags() is called which returns. So the command created was
leaked.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/openvz/openvz_driver.c