Changeset d3d267b in mainline


Ignore:
Timestamp:
2023-07-24T16:22:54Z (11 months ago)
Author:
Vojtech Horky <vojtech.horky@…>
Branches:
ticket/834-toolchain-update
Children:
e7dc3a4
Parents:
fa992e5
git-author:
Vojtech Horky <vojtech.horky@…> (2023-07-24 16:17:35)
git-committer:
Vojtech Horky <vojtech.horky@…> (2023-07-24 16:22:54)
Message:

Add missing malloc check

File:
1 edited

Legend:

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

    rfa992e5 rd3d267b  
    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 allocated 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.