check malloc

This commit is contained in:
Danijel Tasov 2023-10-06 10:54:20 +02:00
parent e365f9f58e
commit 1ad7e163fa

View file

@ -758,6 +758,10 @@ main(int argc, char **argv)
host = list;
table = malloc(sizeof(struct rta_host *) * targets);
if(!table) {
crash("main(): malloc failed for host table");
return 3;
}
i = 0;
while(host) {