]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Don't free the interpreter structure until we've actually finished
authorTom Hughes <tom@compton.nu>
Thu, 28 Oct 2004 08:17:57 +0000 (08:17 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 28 Oct 2004 08:17:57 +0000 (08:17 +0000)
using it... Possible fix for bug 89663 spotted by Mike Cavins.

MERGED FROM HEAD

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@2866

coregrind/ume.c

index 735904d227bc9ed750dfd61bd31a303ba8b1e26f..b0dbd3911fd7891419c0e676ff165922e0cfe8d9 100644 (file)
@@ -525,10 +525,10 @@ static int load_ELF(char *hdr, int len, int fd, const char *name,
       mapelf(interp, (ESZ(Addr))baseoff);
 
       close(interp->fd);
-      free(interp);
 
       entry = baseoff + interp->e.e_entry;
       info->interp_base = (ESZ(Addr))base;
+      free(interp);
    } else
       entry = (void *)e->e.e_entry;