|
From: | Philippe Mathieu-Daudé |
Subject: | Re: [Qemu-devel] [PATCH v2 30/30] migration: fix id leak regression |
Date: | Tue, 21 Feb 2017 14:04:47 -0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 |
Hi Marc-André,There is no documentation in "hw/qdev-core.h" for qdev_get_dev_path() and his name doesn't suggest any Heap allocation (like many others). Is there a recommended way in Qemu codebase to give to the user/caller a hit to care about releasing memory? "Learn to Read the Source, Luke."
On 02/21/2017 11:19 AM, Dr. David Alan Gilbert wrote:
* Marc-André Lureau (address@hidden) wrote:This leak was introduced in commit 581f08bac22bdd5e081ae07f68071a0fc3c5c2c7. (it stands out quickly with ASAN once the rest of the leaks are also removed from make check with this series)Oops yes. Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Cc: Dr. David Alan Gilbert <address@hidden> Cc: Juan Quintela <address@hidden> Signed-off-by: Marc-André Lureau <address@hidden> --- migration/savevm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/migration/savevm.c b/migration/savevm.c index 5ecd264134..87c7a00832 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -688,6 +688,7 @@ int vmstate_register_with_alias_id(DeviceState *dev, int instance_id, return -1; } + g_free(id); se->compat = g_new0(CompatEntry, 1); pstrcpy(se->compat->idstr, sizeof(se->compat->idstr), vmsd->name); -- 2.11.0.295.gd7dffce1c.dirty-- Dr. David Alan Gilbert / address@hidden / Manchester, UK
[Prev in Thread] | Current Thread | [Next in Thread] |