Explorar o código

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

git-svn-id: trunk@4411 -
Jonas Maebe %!s(int64=19) %!d(string=hai) anos
pai
achega
ec1d8a139f
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  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;