diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libcamera/v4l2_videodevice.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp index fbe55bc6..3614b2ed 100644 --- a/src/libcamera/v4l2_videodevice.cpp +++ b/src/libcamera/v4l2_videodevice.cpp @@ -1276,14 +1276,7 @@ FileDescriptor V4L2VideoDevice::exportDmabufFd(unsigned int index, return FileDescriptor(); } - FileDescriptor fd(expbuf.fd); - /* - * FileDescriptor takes a duplicate of fd, so we must close the - * original here, otherwise it will be left dangling. - */ - ::close(expbuf.fd); - - return fd; + return FileDescriptor(std::move(expbuf.fd)); } /** |