| Submitter | Julia Lawall |
|---|---|
| Date | May 15, 2010, 9:24 p.m. |
| Message ID | <Pine.LNX.4.64.1005152323480.21345@ask.diku.dk> |
| Download | mbox | patch |
| Permalink | /patch/52736/ |
| State | Not Applicable |
| Delegated to: | David Miller |
| Headers | show |
Comments
Patch
diff -u -p a/drivers/net/wireless/orinoco/wext.c b/drivers/net/wireless/orinoco/wext.c --- a/drivers/net/wireless/orinoco/wext.c +++ b/drivers/net/wireless/orinoco/wext.c @@ -993,11 +993,9 @@ static int orinoco_ioctl_set_genie(struc return -EINVAL; if (wrqu->data.length) { - buf = kmalloc(wrqu->data.length, GFP_KERNEL); + buf = kmemdup(extra, wrqu->data.length, GFP_KERNEL); if (buf == NULL) return -ENOMEM; - - memcpy(buf, extra, wrqu->data.length); } else buf = NULL;