summary refs log tree commit diff stats
path: root/lib/impure
diff options
context:
space:
mode:
Diffstat (limited to 'lib/impure')
-rw-r--r--lib/impure/osinfo_win.nim3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/impure/osinfo_win.nim b/lib/impure/osinfo_win.nim
index 46af1ddd6..208ef7114 100644
--- a/lib/impure/osinfo_win.nim
+++ b/lib/impure/osinfo_win.nim
@@ -369,9 +369,8 @@ proc getFileSize*(file: string): biggestInt =
   var fileData: TWIN32_FIND_DATA
 
   when useWinUnicode:
-    var aa = allocWideCString(file)
+    var aa = newWideCString(file)
     var hFile = FindFirstFileW(aa, fileData)
-    dealloc aa
   else:
     var hFile = FindFirstFileA(file, fileData)