qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Samuel Thibault <samuel.thibault@ens-lyon.org>,
	qemu-devel@nongnu.org, peter.maydell@linaro.org
Subject: Re: [PATCH] baum: Fix crash when Braille output is not available
Date: Wed, 10 Mar 2021 18:23:40 +0100	[thread overview]
Message-ID: <d37169ee-6cc5-2539-45e9-a19c121bbdd4@redhat.com> (raw)
In-Reply-To: <20210310160815.3411019-1-samuel.thibault@ens-lyon.org>

Hi Samuel,

On 3/10/21 5:08 PM, Samuel Thibault wrote:
> When Braille output is not available, the backend properly reports being
> unable to be created, but 5f8e93c3e262 ("util/qemu-timer: Make timer_free()
> imply timer_del()") made the timer_free() call now refuse any NULL
> parameter. char_braille_finalize thus now has to be more careful with
> calling it on baum->cellCount_timer.
> 
> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
> ---
>  chardev/baum.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/chardev/baum.c b/chardev/baum.c
> index 5deca778bc..aca5bf12fb 100644
> --- a/chardev/baum.c
> +++ b/chardev/baum.c
> @@ -631,7 +631,9 @@ static void char_braille_finalize(Object *obj)
>  {
>      BaumChardev *baum = BAUM_CHARDEV(obj);
>  
> -    timer_free(baum->cellCount_timer);
> +    if (baum->cellCount_timer) {
> +        timer_free(baum->cellCount_timer);
> +    }

Paolo's approach is more generic:
https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg03457.html



      parent reply	other threads:[~2021-03-10 17:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-10 16:08 [PATCH] baum: Fix crash when Braille output is not available Samuel Thibault
2021-03-10 17:18 ` Peter Maydell
2021-03-10 17:19   ` Samuel Thibault
2021-03-10 17:23 ` Thomas Huth
2021-04-30 17:01   ` Laurent Vivier
2021-04-30 17:07     ` Laurent Vivier
2021-03-10 17:23 ` Philippe Mathieu-Daudé [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=d37169ee-6cc5-2539-45e9-a19c121bbdd4@redhat.com \
    --to=philmd@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=samuel.thibault@ens-lyon.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).