Changeset a6625c98 in mainline


Ignore:
Timestamp:
2023-10-22T13:56:55Z (14 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2298fc4
Parents:
09b01ed0
git-author:
Vojtech Horky <vojtech.horky@…> (2023-07-24 16:17:35)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2023-10-22 13:56:55)
Message:

Add missing malloc check

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/nic/ar9271/wmi.c

    r09b01ed0 ra6625c98  
    230230        size_t buffer_size = header_size + command_length;
    231231        void *buffer = malloc(buffer_size);
     232        if (buffer == NULL) {
     233                usb_log_error("Failed to allocate WMI message buffer (out of memory).\n");
     234                return ENOMEM;
     235        }
    232236
    233237        if (command_buffer != NULL)
Note: See TracChangeset for help on using the changeset viewer.