mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-14 19:29:08 +02:00
* fixed memory leak after previous change
git-svn-id: branches/objc@13671 -
This commit is contained in:
parent
ab8e119c3e
commit
1705a1e5b8
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user