Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 325821
b: refs/heads/master
c: e58ba01
h: refs/heads/master
i:
  325819: a6f4bdb
v: v3
  • Loading branch information
Alexey Khoroshilov authored and Greg Kroah-Hartman committed Aug 10, 2012
1 parent f86e333 commit 5b1eb02
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e4d37aeb373a5edceecc1dadc76fabbe8bc18e44
refs/heads/master: e58ba01e2cfe7b7d54d28f78c7af3cff4d5419a3
7 changes: 4 additions & 3 deletions trunk/drivers/usb/wusbcore/security.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ int wusb_dev_sec_add(struct wusbhc *wusbhc,
{
int result, bytes, secd_size;
struct device *dev = &usb_dev->dev;
struct usb_security_descriptor *secd;
struct usb_security_descriptor *secd, *new_secd;
const struct usb_encryption_descriptor *etd, *ccm1_etd = NULL;
const void *itr, *top;
char buf[64];
Expand All @@ -221,11 +221,12 @@ int wusb_dev_sec_add(struct wusbhc *wusbhc,
goto out;
}
secd_size = le16_to_cpu(secd->wTotalLength);
secd = krealloc(secd, secd_size, GFP_KERNEL);
if (secd == NULL) {
new_secd = krealloc(secd, secd_size, GFP_KERNEL);
if (new_secd == NULL) {
dev_err(dev, "Can't allocate space for security descriptors\n");
goto out;
}
secd = new_secd;
result = usb_get_descriptor(usb_dev, USB_DT_SECURITY,
0, secd, secd_size);
if (result < secd_size) {
Expand Down

0 comments on commit 5b1eb02

Please sign in to comment.