qcacld-3.0: Fix null ptr dereference in lim_process_assoc_cleanup

Currently, lim_process_assoc_cleanup does not do null validation
for sta_ds which can lead to null pointer derefrence.

Add null pointer check for sta_ds in lim_process_assoc_cleanup

Change-Id: I74ad0e11213c0bec1473984f312f18b5f1082082
CRs-Fixed: 2423883
This commit is contained in:
sheenam monga 2019-04-15 15:43:18 +05:30 • committed by nshrivas
commit d756ff1530

View file

@ -1893,7 +1893,7 @@ void lim_process_assoc_cleanup(struct mac_context *mac_ctx,
qdf_mem_free(assoc_req);
/* to avoid double free */
if (assoc_req_copied && session->parsedAssocReq)
if (assoc_req_copied && session->parsedAssocReq && sta_ds)
session->parsedAssocReq[sta_ds->assocId] = NULL;
}