mirror of
https://github.com/rsmarples/dhcpcd.git
synced 2024-11-24 10:35:03 +08:00
Fix memory issue with prior commit.
This commit is contained in:
parent
72d87266c3
commit
7bbecef4f9
2
dhcpcd.c
2
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user