]> git.proxmox.com Git - mirror_qemu.git/commitdiff
migration: fix id leak regression
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 21 Feb 2017 14:14:51 +0000 (18:14 +0400)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Tue, 28 Feb 2017 11:30:22 +0000 (11:30 +0000)
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)

Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
Cc: Juan Quintela <quintela@redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20170221141451.28305-31-marcandre.lureau@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
migration/savevm.c

index 5ecd264134108bf72c6bddbddd12f2bdf4087538..87c7a0083284798753a36438066ed8523b9c778b 100644 (file)
@@ -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);