diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2018-05-22 10:19:15 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2018-05-22 10:19:15 +0300 |
commit | 160f480a46cbd23873b59ea860b83d47dc98374d (patch) | |
tree | 10ee13923dc6f35137e3dc8f62de157a137517e5 /v4l2.c | |
parent | 1ff11ecf7018188b5596b8aa876326dbbf2f2aa4 (diff) |
v4l2: Free v4l2_device object when closing it
The v4l2_device object is allocated dynamically by v4l2_open(), free it
in v4l2_close() to make the API symmetrical.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'v4l2.c')
-rw-r--r-- | v4l2.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -329,6 +329,7 @@ void v4l2_close(struct v4l2_device *dev) free(dev->name); close(dev->fd); + free(dev); } /* ----------------------------------------------------------------------------- |