[Spice-devel] [PATCH v5 0/8] Start cleaning objects on destruction

Frediano Ziglio fziglio at redhat.com
Mon Dec 5 12:15:58 UTC 2016


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.

Changes since v4:
- added some comments;
- merged some patches;
- split some patches containing multiple cleanups.

Changes since v3:
- removed a merged patch;
- split "Rearrange object destruction" adding needed
  comments.

Changes since v2:
- merged different patches;
- move "Support QXL remove on spice_server_remove_interface"
  at the top;
- added some comments.

Changes since v1:
- removed a merged patch;
- more comments on "red_worker: add RED_WORKER_MESSAGE_CLOSE_WORKER
  message";
- avoid a crash if main_dispatcher is not initialized.

Frediano Ziglio (8):
  Call parent finalize at the and of display_channel_finalize
  Free inputs_channel in spice_server_destroy
  Free QXL instances in spice_server_destroy
  Free main_dispatcher in spice_server_destroy
  replay: Free spice server to detect leaks
  Free replay queues
  Free properly primary surface during replay
  Support QXL remove on spice_server_remove_interface

 server/display-channel.c |  4 ++--
 server/red-replay-qxl.c  |  6 ++++++
 server/reds.c            | 18 ++++++++++++++++++
 server/tests/replay.c    | 21 ++++++++++++++++++---
 4 files changed, 44 insertions(+), 5 deletions(-)

base-commit: f870f0f0306342911197e4b7320b69130c1627ab
-- 
git-series 0.9.1


More information about the Spice-devel mailing list