Skip to content

Commit

Permalink
Fix memory leaks in route(8).
Browse files Browse the repository at this point in the history
Submitted by:	Tom Rix (trix_juniper.net)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D9676
  • Loading branch information
AlexanderChernikov committed Mar 31, 2018
1 parent 756e49c commit 2d58324
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sbin/route/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,7 @@ flushroutes_fib(int fib)
printf("done\n");
}
}
free(buf);
return (error);
}

Expand Down Expand Up @@ -1439,6 +1440,7 @@ interfaces(void)
rtm = (struct rt_msghdr *)(void *)next;
print_rtmsg(rtm, rtm->rtm_msglen);
}
free(buf);
}

static void
Expand Down

0 comments on commit 2d58324

Please sign in to comment.