It turns out we were mallocing too early, so move the allocation so we
don't leak.
This commit is contained in:
parent
5f1413947b
commit
df96f93d49
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=166473
@ -159,7 +159,6 @@ uipaq_attach(device_t self)
|
|||||||
|
|
||||||
ucom->sc_dev = self;
|
ucom->sc_dev = self;
|
||||||
ucom->sc_udev = dev;
|
ucom->sc_udev = dev;
|
||||||
devinfop = malloc (1024, M_USBDEV, M_WAITOK);
|
|
||||||
|
|
||||||
DPRINTFN(10,("\nuipaq_attach: sc=%p\n", sc));
|
DPRINTFN(10,("\nuipaq_attach: sc=%p\n", sc));
|
||||||
|
|
||||||
@ -178,6 +177,11 @@ uipaq_attach(device_t self)
|
|||||||
goto bad;
|
goto bad;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
devinfop = malloc (1024, M_USBDEV, M_WAITOK);
|
||||||
|
if (devinfop == NULL) {
|
||||||
|
err = ENOMEM;
|
||||||
|
goto bad;
|
||||||
|
}
|
||||||
usbd_devinfo(dev, 0, devinfop);
|
usbd_devinfo(dev, 0, devinfop);
|
||||||
ucom->sc_dev = self;
|
ucom->sc_dev = self;
|
||||||
device_set_desc_copy(self, devinfop);
|
device_set_desc_copy(self, devinfop);
|
||||||
|
Loading…
Reference in New Issue
Block a user