Skip to content

Commit

Permalink
System_Info: fixed minor memleak using operator delete[]
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanAizek committed Feb 28, 2024
1 parent 4914db6 commit 53384e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/System_Info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3014,7 +3014,7 @@ QStringList System_Info::Get_Host_FDD_List()
WCHAR *w = new WCHAR[tmp.count()];
tmp.toWCharArray(w);
UINT uDriveType = GetDriveType(w);
delete w;
delete[] w;

if (uDriveType == DRIVE_REMOVABLE)
{
Expand Down Expand Up @@ -3048,7 +3048,7 @@ QStringList System_Info::Get_Host_CDROM_List()
WCHAR *w = new WCHAR[tmp.count()];
tmp.toWCharArray(w);
UINT uDriveType = GetDriveType(w);
delete w;
delete[] w;

if (uDriveType == DRIVE_CDROM)
{
Expand Down

0 comments on commit 53384e4

Please sign in to comment.