Changeset 86d7bfa in mainline for uspace/drv/test2/test2.c


Ignore:
Timestamp:
2011-02-02T20:37:53Z (13 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8b5690f, fc47885
Parents:
1e00216
Message:

avoid possible segfaults on error paths when a fibril fails to be created

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/test2/test2.c

    r1e00216 r86d7bfa  
    103103        if (dev->parent == NULL) {
    104104                fid_t postpone = fibril_create(postponed_birth, dev);
     105                if (postpone == 0) {
     106                        printf(NAME ": fibril_create() error\n");
     107                        return ENOMEM;
     108                }
    105109                fibril_add_ready(postpone);
    106110        } else {
Note: See TracChangeset for help on using the changeset viewer.