[vlc-commits] input: fix a potential leak when reducing controls

Thomas Guillem git at videolan.org
Mon Jun 13 11:45:39 CEST 2016


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Jun 10 09:39:05 2016 +0200| [b2fa4ce4339e1e9bf677e25de637082aeca1512a] | committer: Thomas Guillem

input: fix a potential leak when reducing controls

For now, there is no leaks since reduced controls don't have anything to release.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b2fa4ce4339e1e9bf677e25de637082aeca1512a
---

 src/input/input.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/input/input.c b/src/input/input.c
index 43965ea..6fa10f0 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -1588,6 +1588,12 @@ static inline int ControlPop( input_thread_t *p_input,
     /* */
     const int i_index = ControlGetReducedIndexLocked( p_input );
 
+    for( int i = 0; i < i_index; ++i )
+    {
+        /* Release Reduced controls */
+        ControlRelease( p_sys->control[i].i_type, p_sys->control[i].val );
+    }
+
     /* */
     *pi_type = p_sys->control[i_index].i_type;
     *p_val   = p_sys->control[i_index].val;



More information about the vlc-commits mailing list