* fixed invalid memory reads and potential double freeing when removing

superfluous temporary paralocs for llvm

git-svn-id: trunk@34955 -
This commit is contained in:
Jonas Maebe 2016-11-24 08:57:05 +00:00
parent ed6d993008
commit 280a6e15b7

View File

@ -151,11 +151,11 @@ unit llvmpara;
paraloc^.register:=hlcg.getaddressregister(list,paraloc^.def);
paraloc^.shiftval:=0;
{ remove all other paralocs }
nextloc:=paraloc^.next;
while assigned(nextloc) do
while assigned(paraloc^.next) do
begin
dispose(nextloc);
nextloc:=paraloc^.next;
paraloc^.next:=nextloc^.next;
dispose(nextloc);
end;
end;
paraloc^.llvmloc.loc:=paraloc^.loc;