Message ID | 02c613919fec816e1166823372c8f1d9c94a3488.camel@collabora.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/utils/common/v4l-helpers.h b/utils/common/v4l-helpers.h index 27683a3d286d..45ed997379a1 100644 --- a/utils/common/v4l-helpers.h +++ b/utils/common/v4l-helpers.h @@ -118,7 +118,11 @@ static inline int v4l_wrap_open(struct v4l_fd *f, const char *file, int oflag, . static inline int v4l_wrap_close(struct v4l_fd *f) { - return close(f->fd); + int ret; + + ret = close(f->fd); + f->fd = -1; + return ret; }