Changeset 554e70f in mainline for uspace/lib/c/generic/dnsr.c


Ignore:
Timestamp:
2016-06-17T16:56:08Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5c7be3e
Parents:
401840b
Message:

Sanitize the case when str_dup() fails to allocate memory

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/dnsr.c

    r401840b r554e70f  
    132132        info->cname = str_dup(cname_buf);
    133133
     134        if (info->cname == NULL) {
     135                free(info);
     136                return ENOMEM;
     137        }
     138
    134139        *rinfo = info;
    135140        return EOK;
Note: See TracChangeset for help on using the changeset viewer.