Commit b2fa4ce4 authored by Thomas Guillem's avatar 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.
parent b0efd4fa
...@@ -1588,6 +1588,12 @@ static inline int ControlPop( input_thread_t *p_input, ...@@ -1588,6 +1588,12 @@ static inline int ControlPop( input_thread_t *p_input,
/* */ /* */
const int i_index = ControlGetReducedIndexLocked( 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; *pi_type = p_sys->control[i_index].i_type;
*p_val = p_sys->control[i_index].val; *p_val = p_sys->control[i_index].val;
......
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