Commit 938c3c46 authored by Antoine Cellerier's avatar Antoine Cellerier

Fix CID 207. (Resource leak)

parent 2bf3bbdb
...@@ -1472,7 +1472,8 @@ static block_t* GrabVideo( demux_t *p_demux ) ...@@ -1472,7 +1472,8 @@ static block_t* GrabVideo( demux_t *p_demux )
/* Unlock */ /* Unlock */
if( ioctl( p_sys->i_fd_video, VIDIOC_QBUF, &buf ) < 0 ) 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; return 0;
} }
...@@ -1519,7 +1520,8 @@ static block_t* GrabVideo( demux_t *p_demux ) ...@@ -1519,7 +1520,8 @@ static block_t* GrabVideo( demux_t *p_demux )
/* Unlock */ /* Unlock */
if( ioctl( p_sys->i_fd_video, VIDIOC_QBUF, &buf ) < 0 ) 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; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment