Changeset 11b285d in mainline for kernel/generic/src/sysinfo/sysinfo.c


Ignore:
Timestamp:
2018-05-13T15:19:32Z (6 years ago)
Author:
Jiří Zárevúcky <jiri.zarevucky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ad896eb
Parents:
13db2044
git-author:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-05-13 14:59:01)
git-committer:
Jiří Zárevúcky <jiri.zarevucky@…> (2018-05-13 15:19:32)
Message:

Use standard signature for malloc() in kernel.

The remaining instances of blocking allocation are replaced with
a new separate function named nfmalloc (short for non-failing malloc).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/sysinfo/sysinfo.c

    r13db2044 r11b285d  
    649649                return ret;
    650650
    651         char *path = (char *) malloc(size + 1, 0);
     651        char *path = (char *) nfmalloc(size + 1);
    652652        assert(path);
    653653
     
    716716                } else {
    717717                        /* Allocate buffer for subkeys */
    718                         char *names = (char *) malloc(size, FRAME_ATOMIC);
     718                        char *names = (char *) malloc(size);
    719719                        if (names == NULL)
    720720                                return ret;
     
    758758                return ret;
    759759
    760         char *path = (char *) malloc(size + 1, 0);
     760        char *path = (char *) nfmalloc(size + 1);
    761761        assert(path);
    762762
Note: See TracChangeset for help on using the changeset viewer.