[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] qemu-timer: allow freeing a NULL timer
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH] qemu-timer: allow freeing a NULL timer |
Date: |
Wed, 10 Mar 2021 16:53:04 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 |
On 3/10/21 4:45 PM, Paolo Bonzini wrote:
> Since 5f8e93c3e2 ("util/qemu-timer: Make timer_free() imply timer_del()",
> 2021-01-08)
> it is not possible anymore to pass a NULL pointer to timer_free(). Previously
> it would do nothing as it would simply pass NULL down to g_free().
>
> Rectify this, which also fixes "-chardev braille" when there is no device.
>
> Reported-by: Markus Armbruster <armbru@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> include/qemu/timer.h | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>