From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52006) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMbmy-0003PH-6n for qemu-devel@nongnu.org; Mon, 11 Jul 2016 10:02:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMbmt-0007dR-8W for qemu-devel@nongnu.org; Mon, 11 Jul 2016 10:02:24 -0400 Sender: Paolo Bonzini References: <1467733852-27097-1-git-send-email-kwolf@redhat.com> <1467733852-27097-27-git-send-email-kwolf@redhat.com> From: Paolo Bonzini Message-ID: <8a32ba3d-d717-97f0-bcf5-d117e7495068@redhat.com> Date: Mon, 11 Jul 2016 16:02:15 +0200 MIME-Version: 1.0 In-Reply-To: <1467733852-27097-27-git-send-email-kwolf@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PULL 26/43] vvfat: Use BdrvChild for s->qcow List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-block@nongnu.org Cc: qemu-devel@nongnu.org On 05/07/2016 17:50, Kevin Wolf wrote: > +}; > + > +static int enable_write_target(BlockDriverState *bs, Error **errp) > +{ > + BDRVVVFATState *s = bs->opaque; > BlockDriver *bdrv_qcow = NULL; > BlockDriverState *backing; > QemuOpts *opts = NULL; > @@ -3000,8 +3020,8 @@ static int enable_write_target(BDRVVVFATState *s, Error **errp) > > options = qdict_new(); > qdict_put(options, "driver", qstring_from_str("qcow")); > - s->qcow = bdrv_open(s->qcow_filename, NULL, options, > - BDRV_O_RDWR | BDRV_O_NO_FLUSH, errp); > + s->qcow = bdrv_open_child(s->qcow_filename, options, "write-target", bs, > + &child_vvfat_qcow, false, errp); > if (!s->qcow) { > ret = -EINVAL; > goto err; For whatever reason, Coverity now notices that the "options" QDict is leaked. Who's right? Paolo