mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
qcacld-3.0: Fix possible NULL pointer dereference in os_if_nan_legacy_req()
In function os_if_nan_legacy_req(), if qdf_mem_malloc() call return NULL, this will result in nan_req NULL pointer dereference. Fix is to add NULL pointer check for nan_req before using. Change-Id: I8ce9e9f9fa556606cf5e8d389905c39ff7198f2c CRs-Fixed: 2423772
This commit is contained in:
parent
899d7a97d0
commit
dd904c8e39
1 changed files with 3 additions and 0 deletions
|
|
@ -2575,6 +2575,9 @@ int os_if_nan_legacy_req(struct wlan_objmgr_psoc *psoc, const void *data,
|
|||
}
|
||||
|
||||
nan_req = qdf_mem_malloc(sizeof(*nan_req) + data_len);
|
||||
if (!nan_req)
|
||||
return -ENOMEM;
|
||||
|
||||
nan_req->psoc = psoc;
|
||||
nan_req->params.request_data_len = data_len;
|
||||
qdf_mem_copy(nan_req->params.request_data, data, data_len);
|
||||
|
|
|
|||
Loading…
Reference in a new issue