qcacld-3.0: Check for NULL before dereferencing ll_stats result buffer

Check for NULL before dereferencing ll_stats result buffer.

Change-Id: Ie33b372a0231b8fdbe363d9537723f7f991cc4ac
CRs-Fixed: 2153520
This commit is contained in:
Srinivas Girigowda 2017-12-05 17:09:05 -08:00 committed by snandini
parent 8725cc4f6d
commit 91d726c140

View File

@ -51,8 +51,13 @@ void hdd_debugfs_process_iface_stats(struct hdd_adapter *adapter,
uint8_t *buffer;
ENTER();
iface_stat = data;
if (!ll_stats.result) {
hdd_err("LL statistics buffer is NULL");
return;
}
iface_stat = data;
buffer = ll_stats.result;
buffer += ll_stats.len;
len = scnprintf(buffer, DEBUGFS_LLSTATS_BUF_SIZE - ll_stats.len,