From e75663048b9dd9296ed5e457d0ae37f30bf6ffd1 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Thu, 9 Apr 2020 21:55:33 +0100 Subject: [PATCH] route: revert prior change to rt_new0 --- src/route.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/route.c b/src/route.c index 125c9532..401ce07c 100644 --- a/src/route.c +++ b/src/route.c @@ -349,8 +349,11 @@ rt_new0(struct dhcpcd_ctx *ctx) #endif } else #endif - if ((rt = calloc(1, sizeof(*rt))) == NULL) + if ((rt = malloc(sizeof(*rt))) == NULL) { logerr(__func__); + return NULL; + } + memset(rt, 0, sizeof(*rt)); return rt; } -- 2.47.2