[PATCH 4/4] iw:In case of memory allocation failure by nlmsg_alloc() cqm will pass to NLA_PUT_U32. it should not happen.
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 Signed-off-by: Rahul Jain --- 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
Re: [PATCH 4/4] iw:In case of memory allocation failure by nlmsg_alloc() cqm will pass to NLA_PUT_U32. it should not happen.
On Fri, 2015-06-26 at 09:14 +, Amit Khatri wrote: > 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. Same here - use a single-line subject such as iw: check nlmsg_allocation() and put more detail in the the body. johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html