[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/5] hw/xen: Fix double-free in xen_console store_con_info()
- To: David Woodhouse <dwmw2@xxxxxxxxxxxxx>, qemu-devel@xxxxxxxxxx
- From: Paul Durrant <xadimgnik@xxxxxxxxx>
- Date: Mon, 17 Apr 2023 13:33:38 +0100
- Cc: no Stabellini <sstabellini@xxxxxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>, Marc-André Lureau <marcandre.lureau@xxxxxxxxxx>, Paolo Bonzini <pbonzini@xxxxxxxxxx>, Richard Henderson <richard.henderson@xxxxxxxxxx>, Eduardo Habkost <eduardo@xxxxxxxxxxx>, "Michael S. Tsirkin" <mst@xxxxxxxxxx>, Marcel Apfelbaum <marcel.apfelbaum@xxxxxxxxx>, Daniel P. Berrangé <berrange@xxxxxxxxxx>, Thomas Huth <thuth@xxxxxxxxxx>, Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Mon, 17 Apr 2023 12:33:55 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 12/04/2023 19:51, David Woodhouse wrote:
From: David Woodhouse <dwmw@xxxxxxxxxxxx>
Coverity spotted a double-free (CID 1508254); we g_string_free(path) and
then for some reason immediately call free(path) too.
We should just use g_autoptr() for it anyway, which simplifies the code
a bit.
Fixes: 7a8a749da7d3 ("hw/xen: Move xenstore_store_pv_console_info to
xen_console.c")
Signed-off-by: David Woodhouse <dwmw@xxxxxxxxxxxx>
---
hw/char/xen_console.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
Reviewed-by: Paul Durrant <paul@xxxxxxx>
|