diff options
author | Xin LI <delphij@FreeBSD.org> | 2013-05-30 06:46:26 +0000 |
---|---|---|
committer | Xin LI <delphij@FreeBSD.org> | 2013-05-30 06:46:26 +0000 |
commit | f3d019c7d20f9d0c07d397064fa7cef7711b2455 (patch) | |
tree | 7ad307c72c31cc07657515d09bc98fe727ce8d27 /addrtoname.c | |
parent | 0de8253a2f7ef0628846edb4fdcceb9ccab12d7a (diff) |
Diffstat (limited to 'addrtoname.c')
-rw-r--r-- | addrtoname.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/addrtoname.c b/addrtoname.c index d77f27b0ac4fd..c92870dc324a6 100644 --- a/addrtoname.c +++ b/addrtoname.c @@ -381,6 +381,9 @@ lookup_bytestring(register const u_char *bs, const unsigned int nlen) tp->e_addr2 = k; tp->e_bs = (u_char *) calloc(1, nlen + 1); + if (tp->e_bs == NULL) + error("lookup_bytestring: calloc"); + memcpy(tp->e_bs, bs, nlen); tp->e_nxt = (struct enamemem *)calloc(1, sizeof(*tp)); if (tp->e_nxt == NULL) |