mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Memory leak.
This commit is contained in:
parent
69e1422ee8
commit
4bec137708
1 changed files with 3 additions and 3 deletions
|
|
@ -739,10 +739,11 @@ begin
|
|||
Integer(DriveBits) := GetLogicalDrives;
|
||||
for DriveNum := 0 to 25 do
|
||||
begin
|
||||
New(Drive);
|
||||
if not (DriveNum in DriveBits) then Continue;
|
||||
New(Drive);
|
||||
Result.Add(Drive);
|
||||
with Drive^ do
|
||||
begin
|
||||
if not (DriveNum in DriveBits) then Continue;
|
||||
Name := Char(DriveNum + Ord('a')) + ':\';
|
||||
Path := Name;
|
||||
DriveType := TDriveType(GetDriveType(PChar(Name)));
|
||||
|
|
@ -756,7 +757,6 @@ begin
|
|||
if (DriveType <> dtFloppy) and (DriveType <> dtNetwork) then
|
||||
DriveLabel := mbGetVolumeLabel(Name, True);
|
||||
end;
|
||||
Result.Add(Drive);
|
||||
end;
|
||||
|
||||
end;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue