assembly: fix memory leaks in code using ephemeral pool

Link: https://github.com/GeneAssembly/biosal/issues/697
Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>