Fix memory issue with prior commit.

This commit is contained in:
Roy Marples 2015-11-18 12:06:47 +00:00
parent 72d87266c3
commit 7bbecef4f9

View File

@ -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) {