On Mon 03 Sep 2018 04:34:06 PM CEST, Alberto Garcia <be...@igalia.com> wrote:
> + value = qemu_opt_get_del(opts, "discard"); > + if (value != NULL) { > + if (bdrv_parse_discard_flags(value, &reopen_state->flags) != 0) { > + error_setg(errp, "Invalid discard option"); > + ret = -EINVAL; > + goto error; > + } > + } I just realized that we're leaking the string here. qemu_opt_get_del() expects that the returned value is freed by the caller. I'll correct all the patches from this series with this problem and resend the series. Berto