aboutsummaryrefslogtreecommitdiff
path: root/src/hw/usb.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2015-06-30 11:10:41 -0400
committerKevin O'Connor <kevin@koconnor.net>2015-07-04 14:23:01 -0400
commit3abdc7c018c727b96549930d2929623ca381fff7 (patch)
tree27ff8afdb34f608875fc0fa5edf9a81ab94a4354 /src/hw/usb.c
parent1202f03583f3b8b46e2de6b82630054d53e24801 (diff)
downloadseabios-hppa-3abdc7c018c727b96549930d2929623ca381fff7.zip
seabios-hppa-3abdc7c018c727b96549930d2929623ca381fff7.tar.gz
seabios-hppa-3abdc7c018c727b96549930d2929623ca381fff7.tar.bz2
Make sure all code checks for malloc failures
This is the result of an audit of callers of the malloc_XXX() and memalign_XXX() calls. All callers need to check if these functions return NULL. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/hw/usb.c')
-rw-r--r--src/hw/usb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/hw/usb.c b/src/hw/usb.c
index 1b4ea8b..2d5c224 100644
--- a/src/hw/usb.c
+++ b/src/hw/usb.c
@@ -249,8 +249,10 @@ get_device_config(struct usb_pipe *pipe)
return NULL;
void *config = malloc_tmphigh(cfg.wTotalLength);
- if (!config)
+ if (!config) {
+ warn_noalloc();
return NULL;
+ }
req.wLength = cfg.wTotalLength;
ret = usb_send_default_control(pipe, &req, config);
if (ret) {