Author: melifaro
Date: Sat Mar 31 15:06:14 2018
New Revision: 331844
URL: https://svnweb.freebsd.org/changeset/base/331844

Log:
  Fix memory leaks in route(8).
  
  Submitted by: Tom Rix (trix_juniper.net)
  MFC after:    2 weeks
  Differential Revision:        https://reviews.freebsd.org/D9676

Modified:
  head/sbin/route/route.c

Modified: head/sbin/route/route.c
==============================================================================
--- head/sbin/route/route.c     Sat Mar 31 15:04:41 2018        (r331843)
+++ head/sbin/route/route.c     Sat Mar 31 15:06:14 2018        (r331844)
@@ -523,6 +523,7 @@ retry:
                        printf("done\n");
                }
        }
+       free(buf);
        return (error);
 }
 
@@ -1439,6 +1440,7 @@ retry2:
                rtm = (struct rt_msghdr *)(void *)next;
                print_rtmsg(rtm, rtm->rtm_msglen);
        }
+       free(buf);
 }
 
 static void
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to