[rtems-libbsd commit] ROUTE(8): Fix memory leak

Sebastian Huber sebh at rtems.org
Fri Dec 20 14:29:29 UTC 2013


Module:    rtems-libbsd
Branch:    master
Commit:    00735284b8852c4770c5dbab1fe30baf5dfb0b46
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=00735284b8852c4770c5dbab1fe30baf5dfb0b46

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Dec 20 14:25:06 2013 +0100

ROUTE(8): Fix memory leak

---

 freebsd/sbin/route/route.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/freebsd/sbin/route/route.c b/freebsd/sbin/route/route.c
index 147a5cd..158445d 100644
--- a/freebsd/sbin/route/route.c
+++ b/freebsd/sbin/route/route.c
@@ -411,7 +411,7 @@ fiboptlist_csv(struct rt_ctx *c, const char *arg, struct fibl_head_t *flh)
 	int fib, error;
 
 	if (strcmp("all", arg) == 0) {
-		str = calloc(1, ALLSTRLEN);
+		str0 = str = calloc(1, ALLSTRLEN);
 		if (str == NULL) {
 			error = 1;
 			goto fiboptlist_csv_ret;




More information about the vc mailing list