qcacmn: Avoid NULL pointer access
In function reg_dmn_print_channels_in_opclass, check for NULL pointer of the variable class before dereferencing. Change-Id: I6a17bf85b0a3dfbe1af9434583f31c96c268cc98 CRs-Fixed: 2470338
This commit is contained in:

zatwierdzone przez
nshrivas

rodzic
e44904327a
commit
512104fbe5
@@ -217,7 +217,13 @@ void reg_dmn_print_channels_in_opclass(uint8_t *country, uint8_t op_class)
|
||||
uint16_t i = 0;
|
||||
|
||||
class = reg_get_class_from_country(country);
|
||||
while (class && class->op_class) {
|
||||
|
||||
if (!class) {
|
||||
reg_err("class is NULL");
|
||||
return;
|
||||
}
|
||||
|
||||
while (class->op_class) {
|
||||
if (class->op_class == op_class) {
|
||||
for (i = 0;
|
||||
(i < REG_MAX_CHANNELS_PER_OPERATING_CLASS &&
|
||||
|
Reference in New Issue
Block a user