Commit 03f61eff authored by Francois Cartegnie's avatar Francois Cartegnie

access: mmsu: remove xmalloc

parent f21453e3
...@@ -1133,11 +1133,18 @@ static int mms_ParseCommand( access_t *p_access, ...@@ -1133,11 +1133,18 @@ static int mms_ParseCommand( access_t *p_access,
uint32_t i_id; uint32_t i_id;
free( p_sys->p_cmd ); free( p_sys->p_cmd );
if( (p_sys->p_cmd = malloc( i_data )) )
{
p_sys->i_cmd = i_data; p_sys->i_cmd = i_data;
p_sys->p_cmd = xmalloc( i_data );
memcpy( p_sys->p_cmd, p_data, i_data ); memcpy( p_sys->p_cmd, p_data, i_data );
*pi_used = i_data; /* by default */ *pi_used = i_data; /* by default */
}
else
{
*pi_used = p_sys->i_cmd = 0;
p_sys->i_command = 0;
return -1;
}
if( i_data < MMS_CMD_HEADERSIZE ) if( i_data < MMS_CMD_HEADERSIZE )
{ {
......
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