From f2d4d6f6765e3a6dd63f28876f6fb4254b53b555 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Sun, 24 May 2009 23:10:55 +0000 Subject: [PATCH] Invalidate the elfHeader variable when the image struct is deleted on error, as they share the same pointer. Should fix bug #3955. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30848 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/elf.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/system/kernel/elf.cpp b/src/system/kernel/elf.cpp index 1b84552f35..986b429aa6 100644 --- a/src/system/kernel/elf.cpp +++ b/src/system/kernel/elf.cpp @@ -2164,6 +2164,7 @@ error3: free(programHeaders); error2: delete_elf_image(image); + elfHeader = NULL; error1: free(elfHeader); error: