Browse Source

Avoid memory leak in genconstsymtree

Pierre Muller 1 month ago
parent
commit
4697a21761
1 changed files with 1 additions and 0 deletions
  1. 1 0
      compiler/ncon.pas

+ 1 - 0
compiler/ncon.pas

@@ -352,6 +352,7 @@ implementation
               move(pchar(p.value.valueptr)^,pc^,len);
               pc[len]:=#0;
               p1:=cstringconstnode.createpchar(pc,len,p.constdef);
+              freemem(pc);
             end;
           constwstring :
             p1:=cstringconstnode.createunistr(p.value.valuews);