spice/server
Christophe Fergeau 4b1c95beee Add missing chainups to parent class
A few dispose/finalize implementations were not chaining up to their
parent classes, causing memory leaks.

This fixes leaks like the following:

==16240== Memcheck, a memory error detector
==16240== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==16240== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info
==16240== Command: ./test-leaks
==16240==
==16240==
==16240== HEAP SUMMARY:
==16240==     in use at exit: 245,490 bytes in 3,638 blocks
==16240==   total heap usage: 5,418 allocs, 1,780 frees, 17,676,968 bytes allocated
==16240==
==16240== 16 bytes in 1 blocks are definitely lost in loss record 203 of 771
==16240==    at 0x4C2DADE: malloc (vg_replace_malloc.c:298)
==16240==    by 0x4C2FC91: realloc (vg_replace_malloc.c:785)
==16240==    by 0x52864E: dispatcher_register_handler (dispatcher.c:374)
==16240==    by 0x5293E0: main_dispatcher_constructed (main-dispatcher.c:315)
==16240==    by 0x7F873DB: g_object_new_internal (gobject.c:1823)
==16240==    by 0x7F87EE4: g_object_new_valist (gobject.c:2042)
==16240==    by 0x7F86E90: g_object_new (gobject.c:1626)
==16240==    by 0x5292A5: main_dispatcher_new (main-dispatcher.c:295)
==16240==    by 0x429A0A: do_spice_init (reds.c:3416)
==16240==    by 0x42A3F5: spice_server_init (reds.c:3663)
==16240==    by 0x4095B1: server_leaks (test-leaks.c:45)
==16240==    by 0x844C60A: test_case_run (gtestutils.c:2161)
==16240==    by 0x844C9CA: g_test_run_suite_internal (gtestutils.c:2244)
==16240==    by 0x844CA73: g_test_run_suite_internal (gtestutils.c:2256)
==16240==    by 0x844CC8A: g_test_run_suite (gtestutils.c:2332)
==16240==    by 0x844B92C: g_test_run (gtestutils.c:1599)
==16240==    by 0x409A0B: main (test-leaks.c:126)
==16240==
==16240== 16 bytes in 1 blocks are definitely lost in loss record 204 of 771
==16240==    at 0x4C2DADE: malloc (vg_replace_malloc.c:298)
==16240==    by 0x4C2FC91: realloc (vg_replace_malloc.c:785)
==16240==    by 0x52864E: dispatcher_register_handler (dispatcher.c:374)
==16240==    by 0x5293E0: main_dispatcher_constructed (main-dispatcher.c:315)
==16240==    by 0x7F873DB: g_object_new_internal (gobject.c:1823)
==16240==    by 0x7F87EE4: g_object_new_valist (gobject.c:2042)
==16240==    by 0x7F86E90: g_object_new (gobject.c:1626)
==16240==    by 0x5292A5: main_dispatcher_new (main-dispatcher.c:295)
==16240==    by 0x429A0A: do_spice_init (reds.c:3416)
==16240==    by 0x42A3F5: spice_server_init (reds.c:3663)
==16240==    by 0x40BFD4: test_new (test-display-base.c:902)
==16240==    by 0x40979D: vmc_leaks (test-leaks.c:92)
==16240==    by 0x844C60A: test_case_run (gtestutils.c:2161)
==16240==    by 0x844C9CA: g_test_run_suite_internal (gtestutils.c:2244)
==16240==    by 0x844CA73: g_test_run_suite_internal (gtestutils.c:2256)
==16240==    by 0x844CC8A: g_test_run_suite (gtestutils.c:2332)
==16240==    by 0x844B92C: g_test_run (gtestutils.c:1599)
==16240==    by 0x409A0B: main (test-leaks.c:126)
==16240==
==16240== 96 bytes in 1 blocks are definitely lost in loss record 638 of 771
==16240==    at 0x4C2FA50: calloc (vg_replace_malloc.c:711)
==16240==    by 0x8427D3C: g_malloc0 (gmem.c:124)
==16240==    by 0x842801F: g_malloc0_n (gmem.c:355)
==16240==    by 0x527B44: dispatcher_constructed (dispatcher.c:141)
==16240==    by 0x529321: main_dispatcher_constructed (main-dispatcher.c:307)
==16240==    by 0x7F873DB: g_object_new_internal (gobject.c:1823)
==16240==    by 0x7F87EE4: g_object_new_valist (gobject.c:2042)
==16240==    by 0x7F86E90: g_object_new (gobject.c:1626)
==16240==    by 0x5292A5: main_dispatcher_new (main-dispatcher.c:295)
==16240==    by 0x429A0A: do_spice_init (reds.c:3416)
==16240==    by 0x42A3F5: spice_server_init (reds.c:3663)
==16240==    by 0x4095B1: server_leaks (test-leaks.c:45)
==16240==    by 0x844C60A: test_case_run (gtestutils.c:2161)
==16240==    by 0x844C9CA: g_test_run_suite_internal (gtestutils.c:2244)
==16240==    by 0x844CA73: g_test_run_suite_internal (gtestutils.c:2256)
==16240==    by 0x844CC8A: g_test_run_suite (gtestutils.c:2332)
==16240==    by 0x844B92C: g_test_run (gtestutils.c:1599)
==16240==    by 0x409A0B: main (test-leaks.c:126)
==16240==
==16240== 96 bytes in 1 blocks are definitely lost in loss record 639 of 771
==16240==    at 0x4C2FA50: calloc (vg_replace_malloc.c:711)
==16240==    by 0x8427D3C: g_malloc0 (gmem.c:124)
==16240==    by 0x842801F: g_malloc0_n (gmem.c:355)
==16240==    by 0x527B44: dispatcher_constructed (dispatcher.c:141)
==16240==    by 0x529321: main_dispatcher_constructed (main-dispatcher.c:307)
==16240==    by 0x7F873DB: g_object_new_internal (gobject.c:1823)
==16240==    by 0x7F87EE4: g_object_new_valist (gobject.c:2042)
==16240==    by 0x7F86E90: g_object_new (gobject.c:1626)
==16240==    by 0x5292A5: main_dispatcher_new (main-dispatcher.c:295)
==16240==    by 0x429A0A: do_spice_init (reds.c:3416)
==16240==    by 0x42A3F5: spice_server_init (reds.c:3663)
==16240==    by 0x40BFD4: test_new (test-display-base.c:902)
==16240==    by 0x40979D: vmc_leaks (test-leaks.c:92)
==16240==    by 0x844C60A: test_case_run (gtestutils.c:2161)
==16240==    by 0x844C9CA: g_test_run_suite_internal (gtestutils.c:2244)
==16240==    by 0x844CA73: g_test_run_suite_internal (gtestutils.c:2256)
==16240==    by 0x844CC8A: g_test_run_suite (gtestutils.c:2332)
==16240==    by 0x844B92C: g_test_run (gtestutils.c:1599)
==16240==    by 0x409A0B: main (test-leaks.c:126)
==16240==
==16240== LEAK SUMMARY:
==16240==    definitely lost: 224 bytes in 4 blocks
==16240==    indirectly lost: 0 bytes in 0 blocks
==16240==      possibly lost: 0 bytes in 0 blocks
==16240==    still reachable: 207,718 bytes in 3,312 blocks
==16240==                       of which reachable via heuristic:
==16240==                         newarray           : 1,536 bytes in 16 blocks
==16240==         suppressed: 34,548 bytes in 302 blocks
==16240== Reachable blocks (those to which a pointer was found) are not shown.
==16240== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==16240==
==16240== For counts of detected and suppressed errors, rerun with: -v
==16240== ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 20 from 20)
FAIL test-leaks (exit status: 1)

Acked-by: Frediano Ziglio <fziglio@redhat.com>
2017-03-14 09:19:49 +00:00
..
tests test-leaks: Checks some leaks using TLS 2017-03-08 12:21:15 +00:00
.gitignore gitignore: Reuse top-level gitignore 2016-12-14 19:09:21 +00:00
agent-msg-filter.c Fix minor inconsistencies with declaration and definition 2017-02-16 10:28:52 +00:00
agent-msg-filter.h agent-filter: Use enum as return value 2016-09-16 11:54:56 +01:00
cache-item.h Move RedCacheItem size field inside cache_data union 2016-05-25 09:53:57 +01:00
cache-item.tmpl.c Use SPICE_VERIFY macro for RHEL6 compatibility 2016-11-14 17:22:02 +00:00
char-device.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
char-device.h Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
common-graphics-channel.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
common-graphics-channel.h Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
cursor-channel-client.c Introduce CommonGraphicsChannelClient 2017-03-04 14:58:05 +00:00
cursor-channel-client.h Introduce CommonGraphicsChannelClient 2017-03-04 14:58:05 +00:00
cursor-channel.c red-channel: Use RedChannelCapabilities directly to pass capabilities 2017-03-02 15:34:58 +00:00
cursor-channel.h red-channel: Use RedChannelCapabilities directly to pass capabilities 2017-03-02 15:34:58 +00:00
dcc-private.h dcc: handle preferred video codec message 2017-03-02 17:48:17 +00:00
dcc-send.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
dcc.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
dcc.h Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
demarshallers.h Make sure all headers are independent 2016-05-18 00:24:37 +01:00
dispatcher.c dispatcher: write_safe: move EINTR debug message 2016-12-06 16:45:11 +00:00
dispatcher.h unify header include order 2016-05-12 11:02:54 +01:00
display-channel-private.h Improve statistic code interface 2017-02-15 10:13:48 +00:00
display-channel.c DisplayChannel: start documenting drawable tree 2017-03-09 12:01:35 -06:00
display-channel.h Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
display-limits.h worker: start a DisplayChannelClient unit 2015-11-19 12:43:02 +00:00
event-loop.c Remove core_public and core_interface_adapter globals usage 2016-11-15 16:49:09 +00:00
glib-compat.h display-channel: reuse function to set video codecs 2016-12-05 11:47:37 +00:00
glz-encode-match.tmpl.c server: rename _tmpl files 2015-11-26 13:33:36 +00:00
glz-encode.tmpl.c Fix -Werror=format with DEBUG_ENCODE 2016-07-01 14:00:37 +02:00
glz-encoder-dict.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
glz-encoder-dict.h remove glz_encoder_config.h 2015-12-04 11:57:18 +00:00
glz-encoder-priv.h Make sure all headers are independent 2016-05-18 00:24:37 +01:00
glz-encoder.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
glz-encoder.h unify header include order 2016-05-12 11:02:54 +01:00
gstreamer-encoder.c gstreamer: Add #ifdef around zero_copy() 2017-02-15 11:57:59 +00:00
image-cache.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
image-cache.h Limit direct access to DisplayChannelClient 2016-08-09 10:22:46 -05:00
image-encoders.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
image-encoders.h Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
inputs-channel-client.c red-channel: Move alloc_recv_buf and release_recv_buf to RedChannelClient 2017-03-04 14:58:15 +00:00
inputs-channel-client.h red-channel: Use RedChannelCapabilities directly to pass capabilities 2017-03-02 15:34:58 +00:00
inputs-channel.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
inputs-channel.h Convert RedChannel hierarchy to GObject 2016-10-25 11:32:13 -05:00
jpeg-encoder.c Sort include order in source files 2016-12-16 08:16:21 +00:00
jpeg-encoder.h server: rename files 2015-12-03 23:54:32 +00:00
lz4-encoder.c Use LZ4_compress_fast_continue if available 2016-11-28 18:38:22 +00:00
lz4-encoder.h server: rename files 2015-12-03 23:54:32 +00:00
main-channel-client.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
main-channel-client.h red-channel: Use RedChannelCapabilities directly to pass capabilities 2017-03-02 15:34:58 +00:00
main-channel.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
main-channel.h red-channel: Use RedChannelCapabilities directly to pass capabilities 2017-03-02 15:34:58 +00:00
main-dispatcher.c Add missing chainups to parent class 2017-03-14 09:19:49 +00:00
main-dispatcher.h unify header include order 2016-05-12 11:02:54 +01:00
Makefile.am red-channel: Separate RedChannelCapabilities 2017-03-02 15:32:16 +00:00
memslot.c Add a red_memslot_info_destroy function 2016-11-25 14:36:40 +00:00
memslot.h Add a red_memslot_info_destroy function 2016-11-25 14:36:40 +00:00
migration-protocol.h Fix 'freezed' typo 2016-09-09 14:56:31 +01:00
mjpeg-encoder.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
pixmap-cache.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
pixmap-cache.h Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
red-channel-capabilities.c red-channel: Use RedChannelCapabilities directly to pass capabilities 2017-03-02 15:34:58 +00:00
red-channel-capabilities.h red-channel: Separate RedChannelCapabilities 2017-03-02 15:32:16 +00:00
red-channel-client.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
red-channel-client.h Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
red-channel.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
red-channel.h Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
red-client.c syntax-check: Include config.h file #include <> 2016-11-09 16:20:20 +00:00
red-client.h Convert RedClient to GObject 2016-11-02 19:30:58 +00:00
red-common.h Remove core_public and core_interface_adapter globals usage 2016-11-15 16:49:09 +00:00
red-parse-qxl.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
red-parse-qxl.h Make QXLMessage handling safe 2016-11-09 16:43:40 +00:00
red-pipe-item.c MainChannel: remove another init_send_data arg 2016-12-20 16:11:13 +00:00
red-pipe-item.h MainChannel: remove another init_send_data arg 2016-12-20 16:11:13 +00:00
red-qxl.c red-channel: Use RedChannelCapabilities directly to pass capabilities 2017-03-02 15:34:58 +00:00
red-qxl.h red-channel: Use RedChannelCapabilities directly to pass capabilities 2017-03-02 15:34:58 +00:00
red-record-qxl.c Remove stdbool.h include from .c files 2017-03-09 18:39:13 +01:00
red-record-qxl.h record: Use reference counting for recording 2017-03-02 15:37:40 +00:00
red-replay-qxl.c Remove stdbool.h include from .c files 2017-03-09 18:39:13 +01:00
red-worker.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
red-worker.h Add red_qxl_destroy function 2016-12-02 15:53:39 +00:00
reds-private.h record: Allocate recording file globally from reds.c 2017-03-02 16:14:10 +00:00
reds-stream.c reds-stream: Use true/false instead of TRUE/FALSE 2017-03-09 18:39:57 +01:00
reds-stream.h Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
reds.c Add missing chainups to parent class 2017-03-14 09:19:49 +00:00
reds.h Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
smartcard-channel-client.c smartcard: Remove unneeded 'dispose' implementation 2017-03-14 09:19:30 +00:00
smartcard-channel-client.h Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
smartcard.c red-channel: Move alloc_recv_buf and release_recv_buf to RedChannelClient 2017-03-04 14:58:15 +00:00
smartcard.h Split RedCharDeviceSmartcard and SmartCardChannelClient 2016-09-30 13:14:03 +01:00
sound.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
sound.h Make sure all headers are independent 2016-05-18 00:24:37 +01:00
spice-audio.h Split spice.h 2014-11-27 14:27:18 +01:00
spice-bitmap-utils.c Handle top down bitmaps dumping 2016-11-15 14:12:25 +00:00
spice-bitmap-utils.h server: misc header cleanups 2015-12-09 22:17:51 +00:00
spice-bitmap-utils.tmpl.c server: rename _tmpl files 2015-11-26 13:33:36 +00:00
spice-char.h Constify spice_server_char_device_recognized_subtypes 2016-06-29 08:09:03 +01:00
spice-core.h Split spice.h 2014-11-27 14:27:18 +01:00
spice-experimental.h Add missing license headers 2015-10-19 14:25:36 +02:00
spice-input.h Split spice.h 2014-11-27 14:27:18 +01:00
spice-migration.h server: Use SPICE_GNUC_DEPRECATED to avoid a dependency on glib.h 2016-08-12 09:47:40 +01:00
spice-qxl.h Revert accidentally merged experimental patches 2016-11-09 13:54:58 +00:00
spice-replay.h Make red-replay-qxl.h a public header 2016-11-10 06:37:15 +00:00
spice-server-enums.tmpl.c syntax-check: Use templates for glib-mkenums 2016-11-14 17:45:32 +00:00
spice-server-enums.tmpl.h syntax-check: Use templates for glib-mkenums 2016-11-14 17:45:32 +00:00
spice-server.h Convert RedChannelClient hierarchy to GObject 2016-10-07 14:46:37 -05:00
spice-server.syms streaming: Let the administrator pick the video encoder and codec 2016-06-14 17:04:40 +02:00
spice-version.h.in build-sys: generate spice-version.h 2014-11-27 14:27:33 +01:00
spice.h Make red-replay-qxl.h a public header 2016-11-10 06:37:15 +00:00
spicevmc.c Add missing chainups to parent class 2017-03-14 09:19:49 +00:00
stat-file.c stat-file: Avoid compiler warning 2017-02-03 18:13:22 +00:00
stat-file.h Move some include from header to source 2016-11-30 15:44:28 +00:00
stat.h Improve statistic code interface 2017-02-15 10:13:48 +00:00
stream.c Use bool rather than int return values when appropriate 2017-03-09 18:39:29 +01:00
stream.h streaming: Always delegate bit rate control to the video encoder 2016-11-21 16:47:51 +00:00
sw-canvas.c remove sw-canvas.h 2016-05-09 12:45:37 +01:00
tree.c DisplayChannel: start documenting drawable tree 2017-03-09 12:01:35 -06:00
tree.h DisplayChannel: start documenting drawable tree 2017-03-09 12:01:35 -06:00
utils.c worker: move dcc_add_surface_area_image 2015-11-23 13:50:44 +00:00
utils.h Avoid recursive inclusion of headers 2016-10-20 16:33:20 +01:00
video-encoder.h Make video-encoder.h self independent 2016-06-16 14:14:04 +01:00
zlib-encoder.c Sort include order in source files 2016-12-16 08:16:21 +00:00
zlib-encoder.h Make sure all headers are independent 2016-05-18 00:24:37 +01:00