Skip to contentSkip to conversation

Fix bochs memory leak

PATCH In review Cameron Esfahani via 1 participant 3 messages Dec 12, 2019 – Dec 19, 2019

lore
Share & tools
lore
#0 lore raw

v3 cover Fix bochs memory leak

Fix a small memory leak in the Bochs display driver.

Each frame would leak about 304 bytes.

v2: Add missing signed-off-by line.
v3: Add reviewed-by and fixes lines.

Cameron Esfahani (1):
display/bochs-display: fix memory leak

 hw/display/bochs-display.c | 2 ++
 1 file changed, 2 insertions(+)
Signature · 1 line
2.24.0
#1 lore raw

PATCH v3 1/1 display/bochs-display: fix memory leak

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

---
 hw/display/bochs-display.c | 2 ++
 1 file changed, 2 insertions(+)
hw/display/bochs-display.c +2 -0
index dc1bd1641d..215db9a231 100644
@@ -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);
     }
 }
 
Signature · 1 line
2.24.0
#2 lore raw
In reply to Cameron Esfahani via

Ping.

Cameron Esfahani
[email protected]

"Americans are very skilled at creating a custom meaning from something that's mass-produced."

Ann Powers

Quoted 19 lines · Cameron Esfahani via

Fix a small memory leak in the Bochs display driver.

Each frame would leak about 304 bytes.

v2: Add missing signed-off-by line.
v3: Add reviewed-by and fixes lines.

Cameron Esfahani (1):
display/bochs-display: fix memory leak

hw/display/bochs-display.c | 2 ++

1 file changed, 2 insertions(+)
Signature · 1 line
2.24.0