Re: [PATCH] storage: Cleanup logical volume creation code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 06, 2013 at 14:59:51 +0100, Jiri Denemark wrote:
> On Wed, Mar 06, 2013 at 08:46:15 -0500, John Ferlan wrote:
> > On 03/06/2013 08:04 AM, Jiri Denemark wrote:
> > > @@ -741,11 +741,12 @@ virStorageBackendLogicalCreateVol(virConnectPtr conn,
> > >          virCommandAddArg(cmd, pool->def->source.name);
> > >  
> > >      if (virCommandRun(cmd, NULL) < 0)
> > > -        goto cleanup;
> > > +        goto error;
> > >  
> > > -    if ((fdret = virStorageBackendVolOpen(vol->target.path)) < 0)
> > > -        goto cleanup;
> > > -    fd = fdret;
> > > +    virCommandFree(cmd);
> > 
> > You'll need a 'cmd = NULL' here so that we don't end up in error: making
> > the same call (virCommandFree() does call VIR_FREE(cmd), but that only
> > sets cmd = NULL in that context, when we return here it's not NULL anymore).
> 
> Oops, you're right. Looks like a bad day today :-)
> 
> Is this an ACK or do you need yet another version for adding cmd = NULL?

John responded privately that it was indeed an ACK and I pushed this
patch with the suggested change. Thanks.

Jirka

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]