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
This commit is contained in:
Michael Lotz 2009-05-24 23:10:55 +00:00
parent d40c694ea5
commit f2d4d6f676

View File

@ -2164,6 +2164,7 @@ error3:
free(programHeaders); free(programHeaders);
error2: error2:
delete_elf_image(image); delete_elf_image(image);
elfHeader = NULL;
error1: error1:
free(elfHeader); free(elfHeader);
error: error: