[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v3 2/2] block: Make bdrv_root_attach_child() unr
From: |
Max Reitz |
Subject: |
Re: [Qemu-block] [PATCH v3 2/2] block: Make bdrv_root_attach_child() unref child_bs on failure |
Date: |
Mon, 13 May 2019 17:54:01 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 |
On 13.05.19 17:52, Alberto Garcia wrote:
> On Mon 13 May 2019 04:31:16 PM CEST, Max Reitz wrote:
>>> @@ -2569,10 +2582,6 @@ BdrvChild *bdrv_open_child(const char *filename,
>>> }
>>>
>>> c = bdrv_attach_child(parent, bs, bdref_key, child_role, errp);
>>> - if (!c) {
>>> - bdrv_unref(bs);
>>> - return NULL;
>>> - }
>>>
>>> return c;
>>> }
>>
>> (That could have been simplified even further. *shrug*)
>
> Right, we can remove the 'c' variable altogether. Feel free to edit the
> commit if you want.
OK, I’ll do that, then.
Max
signature.asc
Description: OpenPGP digital signature