Fork us on GitHub Follow us on Facebook Follow us on Twitter

Ignore:
Timestamp:
2018-11-09T22:03:24Z (3 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master
Children:
4f3aa76
Parents:
deacd722
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-11-08 02:55:57)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-11-09 22:03:24)
Message:

Allow as_get_area_info() to fail

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/udebug/udebug_ipc.c

    rdeacd722 rb389f95  
    266266        size_t data_size;
    267267        size_t buf_size;
    268         void *data;
     268        as_area_info_t *data;
    269269
    270270        uspace_addr = IPC_GET_ARG2(call->data); /* Destination address */
     
    274274         * Read area list.
    275275         */
    276         as_get_area_info(AS, (as_area_info_t **) &data, &data_size);
     276        data = as_get_area_info(AS, &data_size);
     277        if (!data) {
     278                IPC_SET_RETVAL(call->data, ENOMEM);
     279                ipc_answer(&TASK->kb.box, call);
     280                return;
     281        }
    277282
    278283        /* Copy MAX(buf_size, data_size) bytes */
     
    297302
    298303        IPC_SET_ARG3(call->data, data_size);
    299         call->buffer = data;
     304        call->buffer = (uint8_t *) data;
    300305
    301306        ipc_answer(&TASK->kb.box, call);
Note: See TracChangeset for help on using the changeset viewer.