Missing Free for getline Allocated Memory

This commit is contained in:
2025-12-09 21:53:39 +01:00
parent e5506fd67e
commit c9c4c0fac2
2 changed files with 3 additions and 0 deletions

View File

@ -41,6 +41,8 @@ void Delete::deleteDrive(Drive *drive)
{ {
// wipefs running // wipefs running
} }
free(cLine);
pclose(deleteCmdOutput); pclose(deleteCmdOutput);
} }
} }

View File

@ -58,6 +58,7 @@ void SMART::readSMARTData(Drive *drive)
SMART::parseTemperature(sLine, temperature); SMART::parseTemperature(sLine, temperature);
} }
free(cLine);
pclose(outputfileSmart); pclose(outputfileSmart);
if (status == 0U) if (status == 0U)