rts: Fix memory leak when loading ELF objects
rts: Fix memory leak when loading ELF objects

Issue discovered by Coverity Scan, CID 43168.

Signed-off-by: Austin Seipp <7ea35d812706d9213868749011af1ed4fa2f6aa0@well-typed.com>
(cherry picked from commit b7278d3d7bbe384eee7538b1e50bb741e99fb01d)

lukexi/ghc-7.8-arm64,hferreiro/replay,lukexi/ghc-7.8-arm64,hferreiro/replay,hferreiro/replay,hferreiro/replay,hferreiro/replay,hferreiro/replay,hferreiro/replay,lukexi/ghc-7.8-arm64,lukexi/ghc-7.8-arm64,lukexi/ghc-7.8-arm64