diff --git a/core/sap/src/sap_module.c b/core/sap/src/sap_module.c index 57c131a477..f617582803 100644 --- a/core/sap/src/sap_module.c +++ b/core/sap/src/sap_module.c @@ -228,6 +228,11 @@ void wlansap_context_put(struct sap_context *ctx) for (i = 0; i < SAP_MAX_NUM_SESSION; i++) { if (gp_sap_ctx[i] == ctx) { if (qdf_atomic_dec_and_test(&sap_ctx_ref_count[i])) { + if (ctx->channelList) { + qdf_mem_free(ctx->channelList); + ctx->channelList = NULL; + ctx->num_of_channel = 0; + } qdf_mem_free(ctx); gp_sap_ctx[i] = NULL; QDF_TRACE(QDF_MODULE_ID_SAP,