From: Shannon Zhao <zhaoshenglong@huawei.com>
To: Michael Tokarev <mjt@tls.msk.ru>, <qemu-devel@nongnu.org>
Cc: qemu-trivial@nongnu.org
Subject: Re: [Qemu-trivial] [PATCH 2/2] hw/display/tcx.c: tcx_realizefn: fix memory leak, make FCode loading error fatal and improve error message
Date: Tue, 2 Jun 2015 14:20:21 +0800 [thread overview]
Message-ID: <556D4B25.1020003@huawei.com> (raw)
In-Reply-To: <1432994083-5677-1-git-send-email-mjt@msgid.tls.msk.ru>
On 2015/5/30 21:54, Michael Tokarev wrote:
> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org>
> ---
> hw/display/tcx.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/hw/display/tcx.c b/hw/display/tcx.c
> index a9f9f66..c2b32c3 100644
> --- a/hw/display/tcx.c
> +++ b/hw/display/tcx.c
> @@ -1014,10 +1014,13 @@ static void tcx_realizefn(DeviceState *dev, Error **errp)
> if (fcode_filename) {
> ret = load_image_targphys(fcode_filename, s->prom_addr,
> FCODE_MAX_ROM_SIZE);
> - if (ret < 0 || ret > FCODE_MAX_ROM_SIZE) {
> - error_report("tcx: could not load prom '%s'", TCX_ROM_FILE);
> - }
> }
> + if (!fcode_filename || ret < 0 || ret > FCODE_MAX_ROM_SIZE) {
> + error_report("tcx: could not load prom '%s'",
> + fcode_filename ? fcode_filename : TCX_ROM_FILE);
> + exit(1);
> + }
> + g_free(fcode_filename);
>
> /* 0/DFB8 : 8-bit plane */
> s->vram = vram_base;
>
--
Shannon
WARNING: multiple messages have this Message-ID (diff)
From: Shannon Zhao <zhaoshenglong@huawei.com>
To: Michael Tokarev <mjt@tls.msk.ru>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] hw/display/tcx.c: tcx_realizefn: fix memory leak, make FCode loading error fatal and improve error message
Date: Tue, 2 Jun 2015 14:20:21 +0800 [thread overview]
Message-ID: <556D4B25.1020003@huawei.com> (raw)
In-Reply-To: <1432994083-5677-1-git-send-email-mjt@msgid.tls.msk.ru>
On 2015/5/30 21:54, Michael Tokarev wrote:
> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org>
> ---
> hw/display/tcx.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/hw/display/tcx.c b/hw/display/tcx.c
> index a9f9f66..c2b32c3 100644
> --- a/hw/display/tcx.c
> +++ b/hw/display/tcx.c
> @@ -1014,10 +1014,13 @@ static void tcx_realizefn(DeviceState *dev, Error **errp)
> if (fcode_filename) {
> ret = load_image_targphys(fcode_filename, s->prom_addr,
> FCODE_MAX_ROM_SIZE);
> - if (ret < 0 || ret > FCODE_MAX_ROM_SIZE) {
> - error_report("tcx: could not load prom '%s'", TCX_ROM_FILE);
> - }
> }
> + if (!fcode_filename || ret < 0 || ret > FCODE_MAX_ROM_SIZE) {
> + error_report("tcx: could not load prom '%s'",
> + fcode_filename ? fcode_filename : TCX_ROM_FILE);
> + exit(1);
> + }
> + g_free(fcode_filename);
>
> /* 0/DFB8 : 8-bit plane */
> s->vram = vram_base;
>
--
Shannon
next prev parent reply other threads:[~2015-06-02 6:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-30 13:54 [Qemu-trivial] [PATCH 2/2] hw/display/tcx.c: tcx_realizefn: fix memory leak, make FCode loading error fatal and improve error message Michael Tokarev
2015-05-30 13:54 ` [Qemu-devel] " Michael Tokarev
2015-06-02 6:20 ` Shannon Zhao [this message]
2015-06-02 6:20 ` Shannon Zhao
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=556D4B25.1020003@huawei.com \
--to=zhaoshenglong@huawei.com \
--cc=mjt@tls.msk.ru \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.