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

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2724

coregrind/ume.c

index 1b0183f999760000e725528c0048ba7f61dfecb7..d874065273597a1020063b6f1607d600e93156eb 100644 (file)
@@ -535,10 +535,11 @@ 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 + exeoff;