Am 20.09.2013 um 16:47 hat Max Reitz geschrieben:
> On 2013-09-20 13:54, Kevin Wolf wrote:
> >It's always IF_NONE for blockdev-add.
> >
> >Signed-off-by: Kevin Wolf <kw...@redhat.com>

> >@@ -839,8 +832,23 @@ DriveInfo *drive_init(QemuOpts *all_opts, 
> >BlockInterfaceType block_default_type)
> >          }
> >      }
> >+    /* Controller type */
> >+    value = qemu_opt_get(legacy_opts, "if");
> >+    if (value) {
> >+        for (type = 0;
> >+             type < IF_COUNT && strcmp(value, if_name[type]);
> >+             type++) {
> >+        }
> >+        if (type == IF_COUNT) {
> >+            error_report("unsupported bus type '%s'", value);
> >+            return NULL;
> I'd suggest "goto fail;" instead.

Yup, otherwise we leak legacy_opts. More instances of the same bug follow
throughout the series, I'll fix them all. Thanks.

Kevin

Reply via email to