Azure / iot-hub-device-update

Device Update for IoT Hub agent
MIT License
51 stars 36 forks source link

Fix potential double free issue in FileInfoUtils_FillFileInfoWithNewestFilesInDir #628

Open Nox-MSFT opened 1 month ago

Nox-MSFT commented 1 month ago

Fix an issue in the FileInfoUtils_FillFileInfoWithNewestFilesInDir() function where, if an error occurs after the FileInfo structure has been partially populated, the cleanup code incorrectly handles the fileName fields. Specifically, the cleanup code frees the fileName fields but does not properly reset these fields in the input array.