handle malloc error for rfcomm_channel incoming

This commit is contained in:
matthias.ringwald 2011-07-25 20:44:22 +00:00
parent 43495c24f8
commit c843351892

View File

@ -1009,6 +1009,10 @@ static void rfcomm_channel_state_machine_2(rfcomm_multiplexer_t * multiplexer, u
case CH_EVT_RCVD_RPN_CMD:
// setup incoming channel
channel = rfcomm_channel_create(multiplexer, service, dlci >> 1);
if (!channel){
// discard request by sending disconnected mode
multiplexer->send_dm_for_dlci = dlci;
}
break;
default:
break;