[vlc-devel] commit: Fix CID 207. (Resource leak) (Antoine Cellerier )
git version control
git at videolan.org
Thu Oct 2 21:13:28 CEST 2008
vlc | branch: 0.9-bugfix | Antoine Cellerier <dionoea at videolan.org> | Tue Sep 30 12:04:26 2008 +0200| [f6c87d2c6e61ced51156aa486a91a57f2dbb676d] | committer: Derk-Jan Hartman
Fix CID 207. (Resource leak)
(cherry picked from commit 938c3c464fdd4d29117c74f35567b613bae3154a)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f6c87d2c6e61ced51156aa486a91a57f2dbb676d
---
modules/access/v4l2/v4l2.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules/access/v4l2/v4l2.c b/modules/access/v4l2/v4l2.c
index 058efd5..2e92127 100644
--- a/modules/access/v4l2/v4l2.c
+++ b/modules/access/v4l2/v4l2.c
@@ -1472,7 +1472,8 @@ static block_t* GrabVideo( demux_t *p_demux )
/* Unlock */
if( ioctl( p_sys->i_fd_video, VIDIOC_QBUF, &buf ) < 0 )
{
- msg_Err (p_demux, "Failed to unlock (VIDIOC_QBUF)");
+ msg_Err( p_demux, "Failed to unlock (VIDIOC_QBUF)" );
+ block_Release( p_block );
return 0;
}
@@ -1519,7 +1520,8 @@ static block_t* GrabVideo( demux_t *p_demux )
/* Unlock */
if( ioctl( p_sys->i_fd_video, VIDIOC_QBUF, &buf ) < 0 )
{
- msg_Err (p_demux, "Failed to unlock (VIDIOC_QBUF)");
+ msg_Err( p_demux, "Failed to unlock (VIDIOC_QBUF)" );
+ block_Release( p_block );
return 0;
}
More information about the vlc-devel
mailing list