Fix a memory leak in the recent patch to detect loops in ELF section