From 72c3a86aedc44f9ddd76b5d36cd46f201f715160 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Tue, 1 Apr 2025 15:41:37 +0100 Subject: [PATCH] Revert issue in initial --- src/route.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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; } -- 2.47.2