From: Roy Marples Date: Tue, 1 Apr 2025 14:41:37 +0000 (+0100) Subject: Revert issue in initial X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=72c3a86aedc44f9ddd76b5d36cd46f201f715160;p=thirdparty%2Fdhcpcd.git Revert issue in initial --- diff --git a/src/route.c b/src/route.c index 2b1e038c..0795896b 100644 --- a/src/route.c +++ b/src/route.c @@ -383,10 +383,11 @@ rt_new0(struct dhcpcd_ctx *ctx) #endif } else #endif - if (rt == NULL && (rt = malloc(sizeof(*rt))) == NULL) + if ((rt = malloc(sizeof(*rt))) == NULL) { logerr(__func__); - else - memset(rt, 0, sizeof(*rt)); + return NULL; + } + memset(rt, 0, sizeof(*rt)); return rt; }