mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-22 23:51:32 +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
|
var
|
||||||
reflab : tasmlabel;
|
reflab : tasmlabel;
|
||||||
strlab : tasmsymbol;
|
strlab : tasmsymbol;
|
||||||
pc : pchar;
|
|
||||||
begin
|
begin
|
||||||
{ have we already generated a reference for this string entry? }
|
{ have we already generated a reference for this string entry? }
|
||||||
if not assigned(entry^.Data) then
|
if not assigned(entry^.Data) then
|
||||||
@ -100,10 +99,8 @@ procedure objcfinishstringrefpoolentry(entry: phashsetitem; stringpool: tconstpo
|
|||||||
{ and now finish the reference }
|
{ and now finish the reference }
|
||||||
current_asmdata.getlabel(reflab,alt_data);
|
current_asmdata.getlabel(reflab,alt_data);
|
||||||
entry^.Data:=reflab;
|
entry^.Data:=reflab;
|
||||||
getmem(pc,entry^.keylength+1);
|
|
||||||
move(entry^.key^,pc^,entry^.keylength);
|
{ add a pointer to the string in the string references section }
|
||||||
pc[entry^.keylength]:=#0;
|
|
||||||
{ add a pointer to the message name in the string references section }
|
|
||||||
new_section(current_asmdata.asmlists[al_objc_pools],refsec,reflab.name,sizeof(pint));
|
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_label.Create(reflab));
|
||||||
current_asmdata.asmlists[al_objc_pools].concat(Tai_const.Create_sym(strlab));
|
current_asmdata.asmlists[al_objc_pools].concat(Tai_const.Create_sym(strlab));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user