From cf7d57c5f686f1e3597b20bba68588c64a33877c Mon Sep 17 00:00:00 2001 From: Shashikala Prabhu Date: Mon, 17 Sep 2018 14:27:47 +0530 Subject: [PATCH] qcacmn: Do not allocate 0 byte memory in DFS component In DFS component 0 byte memory is allocated when dfs_nol_count is 0. We see a print 'allocating 0 bytes at this location' during wifi unload. Change-Id: I5d6ad36875d634ee5ae6a138656bdb3f538bcdbe CRs-Fixed: 2316513 --- umac/dfs/core/src/misc/dfs_nol.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/umac/dfs/core/src/misc/dfs_nol.c b/umac/dfs/core/src/misc/dfs_nol.c index ea3e37b59b..8d203aa54a 100644 --- a/umac/dfs/core/src/misc/dfs_nol.c +++ b/umac/dfs/core/src/misc/dfs_nol.c @@ -475,6 +475,11 @@ void dfs_nol_update(struct wlan_dfs *dfs) struct dfsreq_nolelem *dfs_nol; int nlen; + if (!dfs->dfs_nol_count) { + dfs_debug(dfs, WLAN_DEBUG_DFS_NOL, "dfs_nol_count is zero"); + return; + } + /* * Allocate enough entries to store the NOL. At least on Linux * (don't ask why), if you allocate a 0 entry array, the