summaryrefslogtreecommitdiff
path: root/v4l2.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-05-22 10:19:15 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-05-22 10:19:15 +0300
commit160f480a46cbd23873b59ea860b83d47dc98374d (patch)
tree10ee13923dc6f35137e3dc8f62de157a137517e5 /v4l2.c
parent1ff11ecf7018188b5596b8aa876326dbbf2f2aa4 (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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/v4l2.c b/v4l2.c
index 81ff90e..3baf55b 100644
--- a/v4l2.c
+++ b/v4l2.c
@@ -329,6 +329,7 @@ void v4l2_close(struct v4l2_device *dev)
free(dev->name);
close(dev->fd);
+ free(dev);
}
/* -----------------------------------------------------------------------------