nvdimm_set_uuid() leaks memory on qemu_uuid_parse() failure.  Fix
that.

Fixes: 6c5627bb24dcd68c997857a8b671617333b1289f
Cc: Xiao Guangrong <xiaoguangrong.e...@gmail.com>
Cc: Shivaprasad G Bhat <sb...@linux.ibm.com>
Signed-off-by: Markus Armbruster <arm...@redhat.com>
Message-Id: <20200505101908.6207-2-arm...@redhat.com>
Tested-by: Shivaprasad G Bhat <sb...@linux.ibm.com>
Reviewed-by: Shivaprasad G Bhat <sb...@linux.ibm.com>
---
 hw/mem/nvdimm.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/hw/mem/nvdimm.c b/hw/mem/nvdimm.c
index c5adedcc69..76f66e0b19 100644
--- a/hw/mem/nvdimm.c
+++ b/hw/mem/nvdimm.c
@@ -97,7 +97,6 @@ static void nvdimm_set_uuid(Object *obj, Visitor *v, const 
char *name,
     if (qemu_uuid_parse(value, &nvdimm->uuid) != 0) {
         error_setg(errp, "Property '%s.%s' has invalid value",
                    object_get_typename(obj), name);
-        goto out;
     }
     g_free(value);
 
-- 
2.21.3


Reply via email to