From: Roy Marples Date: Wed, 18 Nov 2015 12:06:47 +0000 (+0000) Subject: Fix memory issue with prior commit. X-Git-Tag: v6.9.4~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7bbecef4f9428495cb133e2a96a9b0d56f5076d9;p=thirdparty%2Fdhcpcd.git Fix memory issue with prior commit. --- diff --git a/dhcpcd.c b/dhcpcd.c index d5d497a3..98218105 100644 --- a/dhcpcd.c +++ b/dhcpcd.c @@ -1634,7 +1634,7 @@ main(int argc, char **argv) ctx.ifaces = if_discover(&ctx, argc - optind, argv + optind); } else { - if ((ctx.ifaces = malloc(sizeof(ctx.ifaces))) != NULL) + if ((ctx.ifaces = malloc(sizeof(*ctx.ifaces))) != NULL) TAILQ_INIT(ctx.ifaces); } if (ctx.ifaces == NULL) {