mirror of https://github.com/xemu-project/xemu.git
nvdimm: Plug memory leak in uuid property setter
nvdimm_set_uuid() leaks memory on qemu_uuid_parse() failure. Fix
that.
Fixes: 6c5627bb24
Cc: Xiao Guangrong <xiaoguangrong.eric@gmail.com>
Cc: Shivaprasad G Bhat <sbhat@linux.ibm.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20200505101908.6207-2-armbru@redhat.com>
Tested-by: Shivaprasad G Bhat <sbhat@linux.ibm.com>
Reviewed-by: Shivaprasad G Bhat <sbhat@linux.ibm.com>
This commit is contained in:
parent
ddc760832f
commit
75de4efa00
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue