During the HR codec initialization, a part of the state is
allocated, but not freed at exit. Let's fix this.
Found during debugging with Valgrind:
4,932 bytes in 1 blocks are definitely lost in loss record 177 of 179
at 0x4C2AB80: malloc (in vgpreload_memcheck-amd64-linux.so)
by 0x6381C8F: gsmhr_init (libgsmhr.c:63)
by 0x526DF62: osmo_gapk_pq_queue_codec (pq_codec.c:48)
by 0x401ACE: make_processing_chain (app_osmo_gapk.c:573)
by 0x401ACE: main (app_osmo_gapk.c:765)
Change-Id: Ie9ead89c2272782de8d928f29753e6a523cf8834
Basically the reference code has a bunch of global state.
With some minimal patchihg (previous commit) we can ensure that all
that state is within .bss
So what we do it to save/restore the bss section between calls of the
reference code so we can process several in // and we don't have to
completely fix all reference to global state in the reference codec.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>