diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2015-06-30 11:10:41 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2015-07-04 14:23:01 -0400 |
commit | 3abdc7c018c727b96549930d2929623ca381fff7 (patch) | |
tree | 27ff8afdb34f608875fc0fa5edf9a81ab94a4354 /src/hw/usb.c | |
parent | 1202f03583f3b8b46e2de6b82630054d53e24801 (diff) | |
download | seabios-3abdc7c018c727b96549930d2929623ca381fff7.tar.gz |
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.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/hw/usb.c b/src/hw/usb.c index 1b4ea8be..2d5c2240 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) { |