From 1705a1e5b84d5ff9aef3305d4e8762833611bdfe Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Mon, 7 Sep 2009 19:05:48 +0000 Subject: [PATCH] * fixed memory leak after previous change git-svn-id: branches/objc@13671 - --- compiler/objcgutl.pas | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/compiler/objcgutl.pas b/compiler/objcgutl.pas index 87f24da78f..33bbc78a2b 100644 --- a/compiler/objcgutl.pas +++ b/compiler/objcgutl.pas @@ -89,7 +89,6 @@ procedure objcfinishstringrefpoolentry(entry: phashsetitem; stringpool: tconstpo var reflab : tasmlabel; strlab : tasmsymbol; - pc : pchar; begin { have we already generated a reference for this string entry? } if not assigned(entry^.Data) then @@ -100,10 +99,8 @@ procedure objcfinishstringrefpoolentry(entry: phashsetitem; stringpool: tconstpo { and now finish the reference } current_asmdata.getlabel(reflab,alt_data); entry^.Data:=reflab; - getmem(pc,entry^.keylength+1); - move(entry^.key^,pc^,entry^.keylength); - pc[entry^.keylength]:=#0; - { add a pointer to the message name in the string references section } + + { add a pointer to the string in the string references section } new_section(current_asmdata.asmlists[al_objc_pools],refsec,reflab.name,sizeof(pint)); current_asmdata.asmlists[al_objc_pools].concat(Tai_label.Create(reflab)); current_asmdata.asmlists[al_objc_pools].concat(Tai_const.Create_sym(strlab));