Browse Source

* fixed (real)modulename memory leak when changing the module name

git-svn-id: trunk@21954 -
Jonas Maebe 13 years ago
parent
commit
ba4b08261c
1 changed files with 2 additions and 0 deletions
  1. 2 0
      compiler/fmodule.pas

+ 2 - 0
compiler/fmodule.pas

@@ -965,6 +965,8 @@ implementation
 
     procedure tmodule.setmodulename(const s:string);
       begin
+        stringdispose(modulename);
+        stringdispose(realmodulename);
         modulename:=stringdup(upper(s));
         realmodulename:=stringdup(s);
         { also update asmlibrary names }