diff mbox series

[v3,1/1] display/bochs-display: fix memory leak

Message ID 5f747e7faa7339a5406501db8326fa25c0260d48.1576139278.git.dirty@apple.com (mailing list archive)
State New, archived
Headers show
Series Fix bochs memory leak | expand

Commit Message

Zhijian Li (Fujitsu)" via Dec. 12, 2019, 8:30 a.m. UTC
Fix memory leak in bochs_display_update().  Leaks 304 bytes per frame.

Fixes: 33ebad54056
Signed-off-by: Cameron Esfahani <dirty@apple.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/display/bochs-display.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/hw/display/bochs-display.c b/hw/display/bochs-display.c
index dc1bd1641d..215db9a231 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);
     }
 }