Changeset 823 in openpam


Ignore:
Timestamp:
Oct 16, 2014, 1:44:34 PM (6 years ago)
Author:
Dag-Erling Smørgrav
Message:

Compare the return value from mmap() to MAP_FAILED, not NULL.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/liboath/oath_key_alloc.c

    r799 r823  
    6161        flags |= MAP_NOCORE;
    6262#endif
    63         if ((key = mmap(NULL, sizeof *key, prot, flags, -1, 0)) != NULL) {
     63        if ((key = mmap(NULL, sizeof *key, prot, flags, -1, 0)) != MAP_FAILED) {
    6464                memset(key, 0, sizeof *key);
    6565                key->mapped = 1;
Note: See TracChangeset for help on using the changeset viewer.