提交 0a38c8e1 编写于 作者: S sudip 提交者: Kalle Valo

libertas: check for NULL before use

If kzalloc fails it will return NULL. Lets check for NULL first before
using the pointer.
Signed-off-by: NSudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
上级 68ec5810
...@@ -1108,7 +1108,7 @@ static int lbs_associate(struct lbs_private *priv, ...@@ -1108,7 +1108,7 @@ static int lbs_associate(struct lbs_private *priv,
size_t len, resp_ie_len; size_t len, resp_ie_len;
int status; int status;
int ret; int ret;
u8 *pos = &(cmd->iebuf[0]); u8 *pos;
u8 *tmp; u8 *tmp;
lbs_deb_enter(LBS_DEB_CFG80211); lbs_deb_enter(LBS_DEB_CFG80211);
...@@ -1117,6 +1117,7 @@ static int lbs_associate(struct lbs_private *priv, ...@@ -1117,6 +1117,7 @@ static int lbs_associate(struct lbs_private *priv,
ret = -ENOMEM; ret = -ENOMEM;
goto done; goto done;
} }
pos = &cmd->iebuf[0];
/* /*
* cmd 50 00 * cmd 50 00
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册