Memleaks in cdf code
[jamrial@ArchVM tools]$ valgrind --error-exitcode=1 --malloc-fill=0x2a --track-origins=yes --leak-check=full --show-leak-kinds=all ./dav1d -i Chimera-AV1-8bit-480x270-552kbps.ivf --limit=1 --muxer yuv -o /dev/null
==648== Memcheck, a memory error detector
==648== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==648== Using Valgrind-3.14.0.GIT and LibVEX; rerun with -h for copyright info
==648== Command: ./dav1d -i Chimera-AV1-8bit-480x270-552kbps.ivf --limit=1 --muxer yuv -o /dev/null
==648==
dav1d 540c0a7 - by VideoLAN
Decoded 1/1 frames (100.0%)
==648==
==648== HEAP SUMMARY:
==648== in use at exit: 20,860 bytes in 2 blocks
==648== total heap usage: 29 allocs, 27 frees, 856,872 bytes allocated
==648==
==648== 40 bytes in 1 blocks are still reachable in loss record 1 of 2
==648== at 0x483777F: malloc (vg_replace_malloc.c:299)
==648== by 0x4859B3E: dav1d_ref_create (ref.c:39)
==648== by 0x4879E64: dav1d_cdf_thread_alloc (cdf.c:4216)
==648== by 0x4871344: dav1d_init_states (cdf.c:4065)
==648== by 0x487047A: dav1d_submit_frame (decode.c:2768)
==648== by 0x485EA13: dav1d_parse_obus (obu.c:1069)
==648== by 0x48CE823: dav1d_decode (lib.c:193)
==648== by 0x10A687: main (dav1d.c:108)
==648==
==648== 20,820 bytes in 1 blocks are still reachable in loss record 2 of 2
==648== at 0x4839EC3: memalign (vg_replace_malloc.c:898)
==648== by 0x4839FF0: posix_memalign (vg_replace_malloc.c:1062)
==648== by 0x4859ABA: dav1d_alloc_aligned (mem.h:46)
==648== by 0x4859B53: dav1d_ref_create (ref.c:40)
==648== by 0x4879E64: dav1d_cdf_thread_alloc (cdf.c:4216)
==648== by 0x4871344: dav1d_init_states (cdf.c:4065)
==648== by 0x487047A: dav1d_submit_frame (decode.c:2768)
==648== by 0x485EA13: dav1d_parse_obus (obu.c:1069)
==648== by 0x48CE823: dav1d_decode (lib.c:193)
==648== by 0x10A687: main (dav1d.c:108)
==648==
==648== LEAK SUMMARY:
==648== definitely lost: 0 bytes in 0 blocks
==648== indirectly lost: 0 bytes in 0 blocks
==648== possibly lost: 0 bytes in 0 blocks
==648== still reachable: 20,860 bytes in 2 blocks
==648== suppressed: 0 bytes in 0 blocks
==648==
==648== For counts of detected and suppressed errors, rerun with: -v
==648== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Reachable blocks, so they are not as critical and are also not reported by Valgrind by default (Needs --show-leak-kinds=all).