diff --git a/src/linux/backend-v4l2.cpp b/src/linux/backend-v4l2.cpp index 114e75ab5f..eb787aab83 100644 --- a/src/linux/backend-v4l2.cpp +++ b/src/linux/backend-v4l2.cpp @@ -879,8 +879,12 @@ namespace librealsense bool md_extracted = false; buffers_mgr buf_mgr(_use_memory_map); // RAII to handle exceptions - std::unique_ptr > md_poller(nullptr, - [this,&buf_mgr,&md_extracted,&fds](int* d){ if (!md_extracted) acquire_metadata(buf_mgr,fds);}); + std::unique_ptr > md_poller(new int(0), + [this,&buf_mgr,&md_extracted,&fds](int* d) + { + if (!md_extracted) acquire_metadata(buf_mgr,fds); + delete d; + }); if(FD_ISSET(_fd, &fds)) {