projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
68ec581
)
libertas: check for NULL before use
author
sudip
<sudipm.mukherjee@gmail.com>
Tue, 24 Nov 2015 08:21:38 +0000
(13:51 +0530)
committer
Kalle Valo
<kvalo@codeaurora.org>
Thu, 26 Nov 2015 13:05:10 +0000
(15:05 +0200)
If kzalloc fails it will return NULL. Lets check for NULL first before
using the pointer.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/marvell/libertas/cfg.c
patch
|
blob
|
history
diff --git
a/drivers/net/wireless/marvell/libertas/cfg.c
b/drivers/net/wireless/marvell/libertas/cfg.c
index
8317afd
..
86955c4
100644
(file)
--- a/
drivers/net/wireless/marvell/libertas/cfg.c
+++ b/
drivers/net/wireless/marvell/libertas/cfg.c
@@
-1108,7
+1108,7
@@
static int lbs_associate(struct lbs_private *priv,
size_t len, resp_ie_len;
int status;
int ret;
- u8 *pos
= &(cmd->iebuf[0])
;
+ u8 *pos;
u8 *tmp;
lbs_deb_enter(LBS_DEB_CFG80211);
@@
-1117,6
+1117,7
@@
static int lbs_associate(struct lbs_private *priv,
ret = -ENOMEM;
goto done;
}
+ pos = &cmd->iebuf[0];
/*
* cmd 50 00