qcacld-3.0: Add NULL check for qdf_ctx
Add NULL check for pointer qdf_ctx as it returned from call to function 'cds_get_context' may be NULL and could be dereferenced. Change-Id: Iea44cd1a2d20ee04d1720c4e8af1065320a589fd CRs-Fixed: 1024778
Šī revīzija ir iekļauta:

revīziju iesūtīja
Akash Patel

vecāks
50da826021
revīzija
9736118d7e
@@ -372,6 +372,12 @@ void sap_update_unsafe_channel_list(ptSapContext pSapCtx)
|
||||
uint16_t unsafe_channel_count = 0;
|
||||
qdf_device_t qdf_ctx = cds_get_context(QDF_MODULE_ID_QDF_DEVICE);
|
||||
|
||||
if (!qdf_ctx) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SAP, QDF_TRACE_LEVEL_FATAL,
|
||||
"qdf_ctx is NULL");
|
||||
return;
|
||||
}
|
||||
|
||||
/* Flush, default set all channel safe */
|
||||
for (i = 0; i < NUM_CHANNELS; i++) {
|
||||
safe_channels[i].isSafe = true;
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user