Browse Source

* Patch from 7048

git-svn-id: trunk@5535 -
marco 18 years ago
parent
commit
f68280e91c
1 changed files with 5 additions and 1 deletions
  1. 5 1
      rtl/inc/wstrings.inc

+ 5 - 1
rtl/inc/wstrings.inc

@@ -182,12 +182,16 @@ begin
     exit;
 {$ifndef MSWINDOWS}
   Dec (S,WideFirstOff);
+  Freemem(S);
 {$else MSWINDOWS}
   if winwidestringalloc then
     SysFreeString(S)
   else
+    begin
+      Dec (S,WideFirstOff);
+      Freemem(S);
+    end;
 {$endif MSWINDOWS}
-    FreeMem (S);
   S:=Nil;
 end;