qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] fixup! qom: Avoid unvisited 'id'/'qom-type' in user_creatable_add_opts
@ 2017-03-22 17:30 Eric Blake
  2017-03-22 17:35 ` no-reply
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Blake @ 2017-03-22 17:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru, lvivier, qemu-stable, Andreas Färber

CC: qemu-stable@nongnu.org
Signed-off-by: Eric Blake <eblake@redhat.com>

---

Markus already issued the pull request, so if that goes in before
he can squash this for a v2, then I'll have to turn this into a
full-blown patch.

v3.5: avoid memory leak when id is not present
v3: enhance commit message
v2: new patch
---
 qom/object_interfaces.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/qom/object_interfaces.c b/qom/object_interfaces.c
index cc9a694..9c271ad 100644
--- a/qom/object_interfaces.c
+++ b/qom/object_interfaces.c
@@ -122,6 +122,7 @@ Object *user_creatable_add_opts(QemuOpts *opts, Error **errp)
     }
     if (!id) {
         error_setg(errp, QERR_MISSING_PARAMETER, "id");
+        g_free(type);
         return NULL;
     }

-- 
2.9.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-03-22 17:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-22 17:30 [Qemu-devel] [PATCH] fixup! qom: Avoid unvisited 'id'/'qom-type' in user_creatable_add_opts Eric Blake
2017-03-22 17:35 ` no-reply
2017-03-22 17:39   ` Eric Blake

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).