Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@verge.net.au>
To: qiuguorui1 <qiuguorui1@huawei.com>
Cc: leeyou.li@huawei.com, bhsharma@redhat.com,
	kexec@lists.infradead.org, zengweilin@huawei.com
Subject: Re: [PATCH v2] dt-ops: fix memory leak when new_node malloc fails
Date: Wed, 9 Dec 2020 13:43:19 +0100	[thread overview]
Message-ID: <20201209124319.GB21612@vergenet.net> (raw)
In-Reply-To: <20201201040616.18618-1-qiuguorui1@huawei.com>

On Tue, Dec 01, 2020 at 12:06:16PM +0800, qiuguorui1 wrote:
> In function dtb_set_property, when malloc new_node fails,
> we need to free new_dtb before return.
> 
> Fixes: f56cbcf4c2766 ("kexec/dt-ops.c: Fix '/chosen' v/s 'chosen' node
> being passed to fdt helper functions")
> Signed-off-by: qiuguorui1 <qiuguorui1@huawei.com>
> 
> v2:
>   use goto instead of free here,based on Simon Horman's advice:
>   "Can we use the goto idiom here, as is used elsewhere in this function?"
> 
> v1: http://lists.infradead.org/pipermail/kexec/2020-November/021809.html

Thanks, applied.

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

      reply	other threads:[~2020-12-09 12:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01  4:06 [PATCH v2] dt-ops: fix memory leak when new_node malloc fails qiuguorui1
2020-12-09 12:43 ` Simon Horman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201209124319.GB21612@vergenet.net \
    --to=horms@verge.net.au \
    --cc=bhsharma@redhat.com \
    --cc=kexec@lists.infradead.org \
    --cc=leeyou.li@huawei.com \
    --cc=qiuguorui1@huawei.com \
    --cc=zengweilin@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox