diff --git a/smocore/deviceManager/deviceAttachmentPipeSpecParser.cpp b/smocore/deviceManager/deviceAttachmentPipeSpecParser.cpp index 627d238..990a605 100644 --- a/smocore/deviceManager/deviceAttachmentPipeSpecParser.cpp +++ b/smocore/deviceManager/deviceAttachmentPipeSpecParser.cpp @@ -47,9 +47,10 @@ void DeviceManager::collateAllDapSpecs(void) void DeviceManager::parseAllDapSpecs(void) { - std::unique_ptr input( + auto file_deleter = [](FILE* f) { if (f) fclose(f); }; + std::unique_ptr input( fmemopen((void*)allDapSpecs.c_str(), allDapSpecs.size(), "r"), - &fclose); + file_deleter); if (!input) {