mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
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:
parent
e44904327a
commit
512104fbe5
1 changed files with 7 additions and 1 deletions
|
|
@ -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 &&
|
||||
|
|
|
|||
Loading…
Reference in a new issue