[libvirt] [PATCH 2/4 v2] conf: Parse and format disk <wwn>

Osier Yang jyang at redhat.com
Fri Aug 31 11:14:29 UTC 2012


On 2012年08月31日 19:10, Osier Yang wrote:
> Validates the wwn while parsing, error out if it's malformed.
>
> * src/util/util.h: Declare virValidateWWN
> * src/util/util.c: Implement virValidateWWN
> * src/libvirt_private.syms: Export virValidateWWN.
> * src/conf/domain_conf.h: New member 'wwn' for disk def.
> * src/conf/domain_conf.c: Parse and format disk<wwn>
> ---

I made a memory leak in this patch, will squash the follow
diff in if pushing.

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index df6599a..40353a4 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -4063,6 +4063,7 @@ cleanup:
      VIR_FREE(copy_on_read);
      VIR_FREE(devaddr);
      VIR_FREE(serial);
+    VIR_FREE(wwn);
      virStorageEncryptionFree(encryption);
      VIR_FREE(startupPolicy);




More information about the libvir-list mailing list