Message ID | 1416586480-19982-10-git-send-email-j.anaszewski@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/utils/media-ctl/libmediactl.c b/utils/media-ctl/libmediactl.c index 003902b..9419fb4 100644 --- a/utils/media-ctl/libmediactl.c +++ b/utils/media-ctl/libmediactl.c @@ -917,13 +917,13 @@ void media_device_unref(struct media_device *media) if (media->refcount > 0) return; + media_close_pipeline_subdevs(media); + for (i = 0; i < media->entities_count; ++i) { struct media_entity *entity = &media->entities[i]; free(entity->pads); free(entity->links); - if (entity->sd->fd != -1) - close(entity->sd->fd); free(entity->sd->v4l2_controls); free(entity->sd); }