Hi Johannes, Subject: [PATCH 4/4] iw:In case of memory allocation failure by nlmsg_alloc() cqm will pass to NLA_PUT_U32. it should not happen.
Signed-off-by: Amit Khatri <amit.kha...@samsung.com> Signed-off-by: Rahul Jain <rahul.j...@samsung.com> --- cqm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cqm.c b/cqm.c index 65876af..bf60401 100644 --- a/cqm.c +++ b/cqm.c @@ -34,6 +34,8 @@ static int iw_cqm_rssi(struct nl80211_state *state, struct nl_cb *cb, /* connection quality monitor attributes */ cqm = nlmsg_alloc(); + if(!cqm) + return -ENOMEM; NLA_PUT_U32(cqm, NL80211_ATTR_CQM_RSSI_THOLD, thold); NLA_PUT_U32(cqm, NL80211_ATTR_CQM_RSSI_HYST, hyst); -- 1.9.1