The error returns for a failed LoadConfig, an unknown Rx antenna name, an unknown Tx antenna name and a failed Configure all return EXIT_FAILURE without calling DeviceRegistry::freeDevice(device), unlike the sibling path just above them and every other exit in the file, so the SDRDevice destructor - which closes the USB or PCIe transport - is skipped.
The error returns for a failed
LoadConfig, an unknown Rx antenna name, an unknown Tx antenna name and a failedConfigureallreturn EXIT_FAILUREwithout callingDeviceRegistry::freeDevice(device), unlike the sibling path just above them and every other exit in the file, so theSDRDevicedestructor - which closes the USB or PCIe transport - is skipped.