stats.c rist_stats leaks
stats.c:75, rist_stats is malloc'd and passed to stats_callback
(if it exists). If it does not exist, the memory is never freed.
stats.c:285, same thing.
May also be worth mentioning in the documentation where the user sets the stats callback that they're responsible for free()ing the memory.