[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] block vvfat.c fix leak when failure occurs

From: Hanna Reitz
Subject: Re: [PATCH] block vvfat.c fix leak when failure occurs
Date: Tue, 23 Nov 2021 09:57:17 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.0

On 19.11.21 12:25, Daniella Lee wrote:
Based on your suggestions. I made a new patch which contians:
1.format detection
2.replace calloc with g_malloc0 in enable_write_target function
3.use g_free without null pointer detection in vvfat_open function
4.delete line "ret = 0", use return ret directly in vvfat_open function

Signed-off-by: Daniella Lee <daniellalee111@gmail.com>
  block/vvfat.c | 16 ++++++++++++----
  1 file changed, 12 insertions(+), 4 deletions(-)

Thanks, looks good to me!

Two remarks for the next time: When you send a new version of a patch, you should mark it as “v2” (and then “v3” and so on) in the subject, e.g. “[PATCH v2]”.  This can be done e.g. with `git format-patch -v2`.

Second, for a new iteration, you should generally keep the commit message from the previous one and not replace it with a change log. Having a change log is very nice, don’t get me wrong, but it shouldn’t be part of the commit message.  Once you’ve formatted the patch with `git format-patch`, you can edit the file and put the change log below the “---” line, e.g. like it was done here: https://lists.nongnu.org/archive/html/qemu-block/2021-09/msg00453.html

No need for you to respin this patch, though, I’ve just replaced the commit message with the one from v1 and applied it to my block branch:


Thanks again,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]