On 04/28/2010 09:27 AM, Daniel P. Berrange wrote:
+ memset(&meta, 0, sizeof(meta));
+
+ ret = virStorageFileGetMetadata(path, &meta);
+
+ if (path != vm->def->disks[i]->src)
+ VIR_FREE(path);
+ path = NULL;
+
+ if (ret < 0)
+ goto cleanup;
+
+ path = meta.backingStore;
I had to go read virStorageFileGetMetadata to make sure there was no
leak or double-free, but after a few minutes review, I'm convinced you
did it right.
ACK.
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org