Commit 09f090b1 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Memory leak (fixes #2442)

parent 09af489c
...@@ -316,9 +316,16 @@ static int QNXManage( vout_thread_t *p_vout ) ...@@ -316,9 +316,16 @@ static int QNXManage( vout_thread_t *p_vout )
if( i_ev == Ph_RESIZE_MSG ) if( i_ev == Ph_RESIZE_MSG )
{ {
PhEvent_t *buf;
i_buflen = PhGetMsgSize( p_event ); i_buflen = PhGetMsgSize( p_event );
if( ( p_event = realloc( p_event, i_buflen ) ) == NULL ) buf = realloc( p_event, i_buflen );
if( buf == NULL )
{
free( p_event );
return( 1 ); return( 1 );
}
p_event = buf;
} }
else if( i_ev == Ph_EVENT_MSG ) else if( i_ev == Ph_EVENT_MSG )
{ {
......
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