[libvirt] [PATCH v3] storage: Avoid memory leak on metadata fetching
Eric Blake
eblake at redhat.com
Thu Jul 14 14:28:45 UTC 2011
On 07/14/2011 08:15 AM, Michal Privoznik wrote:
> Getting metadata on storage allocates a memory (path) which need to
> be freed after use otherwise it gets leaked. This means after use of
> virStorageFileGetMetadataFromFD or virStorageFileGetMetadata one
> must call virStorageFileFreeMetadata to free it. This function frees
> structure internals and structure itself.
> ---
> diff to v2:
> -Jrika's & Eric's review taken in
>
> diff to v1:
> -Eric's review suggestions taken in
>
> cfg.mk | 1 +
> src/conf/domain_conf.c | 18 +++++++++---
> src/libvirt_private.syms | 1 +
> src/storage/storage_backend_fs.c | 54 +++++++++++++++++++++----------------
> src/util/storage_file.c | 18 ++++++++++++
> src/util/storage_file.h | 2 +
> 6 files changed, 66 insertions(+), 28 deletions(-)
ACK - looks like you got all my points addressed.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110714/33a0ce26/attachment-0001.sig>
More information about the libvir-list
mailing list