From: Roy Marples Date: Wed, 4 May 2016 11:48:51 +0000 (+0000) Subject: Check for NULL. X-Git-Tag: v6.11.0~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f2760ea237eb459423990bcfad3c2cc4d2094e4;p=thirdparty%2Fdhcpcd.git Check for NULL. --- diff --git a/ipv6.c b/ipv6.c index d1e2d05f..46596def 100644 --- a/ipv6.c +++ b/ipv6.c @@ -986,6 +986,11 @@ ipv6_handleifa(struct dhcpcd_ctx *ctx, const char *cbp; ap = calloc(1, sizeof(*ap)); + if (ap == NULL) { + logger(ctx, LOG_ERR, + "%s: calloc: %m", __func__); + break; + } ap->iface = ifp; ap->addr = *addr; ap->prefix_len = prefix_len;