[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] qemu-nbd: Fix a memleak in nbd_client_thread()
From: |
Eric Blake |
Subject: |
Re: [PATCH] qemu-nbd: Fix a memleak in nbd_client_thread() |
Date: |
Thu, 3 Dec 2020 10:26:10 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 |
On 12/1/20 8:02 PM, Alex Chen wrote:
> On 2020/12/2 4:15, Eric Blake wrote:
>> While the patch looks correct, we have a lot of duplication. Simpler
>> might be a solution with only one exit label altogether:
>>
>
> Thanks for your review, I will modify the patch and send patch v2 according
> to your suggestion.
> BTW, do I need to split this patch into two patches, one to solve the memleak
> and the other to optimizes the redundant code?
This one seems small enough that a single patch is probably fine (that
is, document that the patch is fixing a memory loop BY consolidating
redundant code).
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org