On Thu, Oct 16, 2008 at 11:28:40AM +0200, Jim Meyering wrote:
"Daniel P. Berrange" <berrange(a)redhat.com> wrote:
> The root filesystem for an openvz guest is defined from a template name.
> We support this when creating a new guest, but never include this info
> when dumping the XML. Thsi patch addresses this problem by reading the
> OSTEMPLATE config parameter
>
> diff -r e0c166ce24bd src/openvz_conf.c
> --- a/src/openvz_conf.c Tue Oct 14 15:46:24 2008 +0100
> +++ b/src/openvz_conf.c Tue Oct 14 15:49:41 2008 +0100
> @@ -308,6 +308,47 @@ error:
> }
>
>
> +static int
> +openvzReadFSConf(virConnectPtr conn,
> + virDomainDefPtr def,
> + int veid) {
> + int ret;
> + virDomainFSDefPtr fs;
This needs to be initialized here or in the 'if' block.
Otherwise, it will be freed uninitialized upon read failure:
virDomainFSDefPtr fs = NULL;
Thanks, will fix that and then commit this.
Daniel
--
|: Red Hat, Engineering, London -o-
http://people.redhat.com/berrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org -o-
http://ovirt.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|