aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-11-29 13:02:08 +0000
committerPeter Maydell <peter.maydell@linaro.org>2018-11-29 13:24:19 +0000
commit664feae026dc0bf060281e408b3113bfaf74623f (patch)
treeabd54deb5c7acf0e945aaa46776dbb7996adcefb
parent67bbb88e5da5b99d69d236137b9e940c47a3ba5a (diff)
downloadqemu-arm-664feae026dc0bf060281e408b3113bfaf74623f.tar.gz
ui/cocoa: Remove unnecessary cleanup function
We register cocoa_cleanup() as an atexit function, but all it does is free the memory used for the DisplayChangeListener struct. Memory is all going to be freed anyway as the process exits, so this is unnecessary. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--ui/cocoa.m9
1 files changed, 0 insertions, 9 deletions
diff --git a/ui/cocoa.m b/ui/cocoa.m
index 3897d2e370..725e16c5a8 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -1777,12 +1777,6 @@ static void cocoa_refresh(DisplayChangeListener *dcl)
[pool release];
}
-static void cocoa_cleanup(void)
-{
- COCOA_DEBUG("qemu_cocoa: cocoa_cleanup\n");
- g_free(dcl);
-}
-
static const DisplayChangeListenerOps dcl_ops = {
.dpy_name = "cocoa",
.dpy_gfx_update = cocoa_update,
@@ -1812,9 +1806,6 @@ static void cocoa_display_init(DisplayState *ds, DisplayOptions *opts)
// register vga output callbacks
dcl->ops = &dcl_ops;
register_displaychangelistener(dcl);
-
- // register cleanup function
- atexit(cocoa_cleanup);
}
static QemuDisplay qemu_display_cocoa = {