mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-01 23:07:45 +08:00
dbus: fix spurious leak reports with SDL_SHUTDOWN_DBUS_ON_QUIT=0
This commit is contained in:
committed by
Sam Lantinga
parent
691a6133d3
commit
c4c185283f
@@ -189,10 +189,16 @@ void SDL_DBus_Quit(void)
|
|||||||
if (dbus.shutdown) {
|
if (dbus.shutdown) {
|
||||||
dbus.shutdown();
|
dbus.shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UnloadDBUSLibrary();
|
||||||
|
} else {
|
||||||
|
/* Leaving libdbus loaded when skipping dbus_shutdown() avoids
|
||||||
|
* spurious leak warnings from LeakSanitizer on internal D-Bus
|
||||||
|
* allocations that would be freed by dbus_shutdown(). */
|
||||||
|
dbus_handle = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_zero(dbus);
|
SDL_zero(dbus);
|
||||||
UnloadDBUSLibrary();
|
|
||||||
if (inhibit_handle) {
|
if (inhibit_handle) {
|
||||||
SDL_free(inhibit_handle);
|
SDL_free(inhibit_handle);
|
||||||
inhibit_handle = NULL;
|
inhibit_handle = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user