diff mbox series

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

Message ID 88b8cdfd7c4e9794256f52669a0d2e8b2cd6ffdd.1576012190.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. 10, 2019, 9:13 p.m. UTC
Fix memory leak in bochs_display_update().  Leaks 304 bytes per frame.
---
 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);
     }
 }