Commit 184bba76 authored by Rémi Duraffort's avatar Rémi Duraffort

Fix dereference before NULL test (CID 106)

parent 0d40e8b4
......@@ -39,12 +39,12 @@ static inline int bits_initwrite( bits_buffer_t *p_buffer,
p_buffer->i_data = 0;
p_buffer->i_mask = 0x80;
p_buffer->p_data = p_data;
p_buffer->p_data[0] = 0;
if( !p_buffer->p_data )
{
if( !( p_buffer->p_data = malloc( i_size ) ) )
return -1;
}
p_buffer->p_data[0] = 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