Browse Source

* fixed for non-Windows and non-OS/2

git-svn-id: trunk@4411 -
Jonas Maebe 19 years ago
parent
commit
ec1d8a139f
1 changed files with 5 additions and 0 deletions
  1. 5 0
      rtl/inc/system.inc

+ 5 - 0
rtl/inc/system.inc

@@ -693,11 +693,16 @@ Begin
   Flush(ErrOutput);
   Flush(ErrOutput);
   Flush(StdOut);
   Flush(StdOut);
   Flush(StdErr);
   Flush(StdErr);
+{$if defined(MSWINDOWS) or defined(OS2)}
   { finally release the heap if possible, especially
   { finally release the heap if possible, especially
     important for DLLs }
     important for DLLs }
   for i:=0 to argc do
   for i:=0 to argc do
     sysfreemem(argv[i]);
     sysfreemem(argv[i]);
   sysfreemem(argv);
   sysfreemem(argv);
+{$endif}
+{$if defined(LINUX) or defined(BSD)}
+  sysfreemem(cmdline);
+{$endif}
   FinalizeHeap;
   FinalizeHeap;
 End;
 End;