[libvirt] [PATCH] storage: Fix a potential crash when creating vol object

Eric Blake eblake at redhat.com
Mon Dec 12 17:37:04 UTC 2011


On 12/12/2011 12:26 AM, Osier Yang wrote:
> If the vol object is newly created, it increases the volumes count,
> but doesn't decrease the volumes count when do cleanup. It can
> cause libvirtd crash when one trying to free the volume objects

s/crash/to crash/

> like:
>     for (i = 0; i < pool->volumes.count; i++)
>         virStorageVolDefFree(pool->volumes.objs[i]);
> 
> It's more reliale if we add the newly created vol object in the

s/reliale/reliable/

> end.
> ---
>  src/storage/storage_backend_logical.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)

ACK.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20111212/103c2824/attachment-0001.sig>


More information about the libvir-list mailing list