[PULL,2/2] display/bochs-display: fix memory leak
diff mbox series

Message ID 20191220060617.32326-3-kraxel@redhat.com
State New
Headers show
Series
  • [PULL,1/2] vhost-user-gpu: Drop trailing json comma
Related show

Commit Message

Gerd Hoffmann Dec. 20, 2019, 6:06 a.m. UTC
From: Cameron Esfahani <dirty@apple.com>

Fix memory leak in bochs_display_update().  Leaks 304 bytes per frame.

Fixes: 33ebad54056
Signed-off-by: Cameron Esfahani <dirty@apple.com>
Message-Id: <d6c26e68db134c7b0c7ce8b61596ca2e65e01e12.1576013209.git.dirty@apple.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/display/bochs-display.c | 2 ++
 1 file changed, 2 insertions(+)

Patch
diff mbox series

diff --git a/hw/display/bochs-display.c b/hw/display/bochs-display.c
index dc1bd1641d34..215db9a231d3 100644
--- a/hw/display/bochs-display.c
+++ b/hw/display/bochs-display.c
@@ -252,6 +252,8 @@  static void bochs_display_update(void *opaque)
             dpy_gfx_update(s->con, 0, ys,
                            mode.width, y - ys);
         }
+
+        g_free(snap);
     }
 }