Implicitly inserted capwap_outofmemory() into the capwap_alloc().

capwap_alloc() can never return NULL.
This commit is contained in:
vemax78
2013-08-18 19:07:19 +02:00
parent 177e997d47
commit d34e98fc2c
87 changed files with 85 additions and 589 deletions

View File

@ -46,20 +46,14 @@ static void* capwap_80211_ie_element_parsing(capwap_message_elements_handle hand
/* */
data = (struct capwap_80211_ie_element*)capwap_alloc(sizeof(struct capwap_80211_ie_element));
if (!data) {
capwap_outofmemory();
}
memset(data, 0, sizeof(struct capwap_80211_ie_element));
/* Retrieve data */
memset(data, 0, sizeof(struct capwap_80211_ie_element));
func->read_u8(handle, &data->radioid);
func->read_u8(handle, &data->wlanid);
func->read_u8(handle, &data->flags);
data->ielength = length;
data->ie = (uint8_t*)capwap_alloc(data->ielength);
if (!data->ie) {
capwap_outofmemory();
}
func->read_block(handle, data->ie, data->ielength);
return data;