Implicitly inserted capwap_outofmemory() into the capwap_alloc().
capwap_alloc() can never return NULL.
This commit is contained in:
@ -55,18 +55,9 @@ static void* capwap_location_element_parsing(capwap_message_elements_handle hand
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* */
|
||||
data = (struct capwap_location_element*)capwap_alloc(sizeof(struct capwap_location_element));
|
||||
if (!data) {
|
||||
capwap_outofmemory();
|
||||
}
|
||||
|
||||
data->value = (uint8_t*)capwap_alloc(length + 1);
|
||||
if (!data->value) {
|
||||
capwap_outofmemory();
|
||||
}
|
||||
|
||||
/* Retrieve data */
|
||||
data = (struct capwap_location_element*)capwap_alloc(sizeof(struct capwap_location_element));
|
||||
data->value = (uint8_t*)capwap_alloc(length + 1);
|
||||
func->read_block(handle, data->value, length);
|
||||
data->value[length] = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user