These patches start destroying objects upon destruction. Lot of the objects are just allocated but never freed. This however make hardier to understand automatically leaks as objects are still linked together. Currently spice_server_destroy is not called so objects are freed only when program ends by the operating system. These patches allows using automated testing and some memory leak detectors (Valgrind, address sanitizer or others) to be used to discover possible leaks. Frediano Ziglio (20): add a red_memslot_info_destroy function red_worker: add RED_WORKER_MESSAGE_CLOSE_WORKER message Free statistic file on spice_server_destroy Free state on spice_server_destroy Use red_channel_destroy to free main_channel Do not leak mig_timer Remove unused and obsolete main_channel_close Return invalid value from very old obsolete functions Remove unused red_channel_get_first_socket Avoid to leak timer in InputsChannel Reuse reds_core_timer_add Add red_qxl_destroy function Support QXL remove on spice_server_remove_interface Rearrange object destruction Free QXL instances in spice_server_destroy replay: Free spice server to detect leaks cursor: Avoid cursor item leak Allows reds_core_timer_remove to accept NULL for timer Free replay queues Free properly primary surface during replay server/char-device.c | 20 +++++++--------- server/cursor-channel.c | 15 ++++++++++++ server/display-channel.c | 4 ++-- server/inputs-channel.c | 12 ++++++++++ server/main-channel-client.c | 8 ++----- server/main-channel.c | 18 ++++----------- server/main-channel.h | 1 - server/memslot.c | 10 ++++++++ server/memslot.h | 1 + server/red-channel.c | 14 ------------ server/red-channel.h | 2 -- server/red-qxl.c | 25 +++++++++++++++++--- server/red-qxl.h | 7 ++++++ server/red-replay-qxl.c | 6 +++++ server/red-worker.c | 53 ++++++++++++++++++++++++++++++++++++++++--- server/red-worker.h | 1 + server/reds.c | 45 ++++++++++++++++++++++++++++-------- server/stat-file.c | 17 ++++++++++++++ server/stat-file.h | 1 + server/tests/replay.c | 21 ++++++++++++++--- server/tests/stat-file-test.c | 2 ++ 21 files changed, 214 insertions(+), 69 deletions(-) -- 2.9.3 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel