[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [libvirt] [PATCH] Fix pool define crash
- From: Chris Lalancette <clalance redhat com>
- To: Cole Robinson <crobinso redhat com>
- Cc: Libvirt <libvir-list redhat com>
- Subject: Re: [libvirt] [PATCH] Fix pool define crash
- Date: Wed, 17 Dec 2008 21:26:51 +0100
Cole Robinson wrote:
> Ahh, I didn't realize the AssignDef caveat. Thanks for pointing that
> out. Something like this should work then?
> diff --git a/src/storage_driver.c b/src/storage_driver.c
> index 2432a9a..330317c 100644
> --- a/src/storage_driver.c
> +++ b/src/storage_driver.c
> @@ -544,12 +544,13 @@ storagePoolDefine(virConnectPtr conn,
>
> if (!(pool = virStoragePoolObjAssignDef(conn, &driver->pools, def)))
> goto cleanup;
> - def = NULL;
>
> if (virStoragePoolObjSaveDef(conn, driver, pool, def) < 0) {
> virStoragePoolObjRemove(&driver->pools, pool);
> + def = NULL;
> goto cleanup;
> }
> + def = NULL;
>
> ret = virGetStoragePool(conn, pool->def->name, pool->def->uuid);
>
Yeah, that looks better. Seems to be good to me, so ACK.
--
Chris Lalancette
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]