Author: melifaro
Date: Thu Jan 14 16:31:00 2016
New Revision: 294020
URL: https://svnweb.freebsd.org/changeset/base/294020

Log:
  Fix panic in IP redirect. Panic was introduced in r293466.
  
  Found by:     Yamagi Burmeister <lists at yamagi.org>>

Modified:
  head/sys/net/route.c

Modified: head/sys/net/route.c
==============================================================================
--- head/sys/net/route.c        Thu Jan 14 16:30:37 2016        (r294019)
+++ head/sys/net/route.c        Thu Jan 14 16:31:00 2016        (r294020)
@@ -576,8 +576,8 @@ rtredirect_fib(struct sockaddr *dst,
                         * Create new route, rather than smashing route to net.
                         */
                create:
-                       RTFREE(rt);
-                       rt = NULL;
+                       if (rt != NULL)
+                               RTFREE_LOCKED(rt);
                
                        flags |= RTF_DYNAMIC;
                        bzero((caddr_t)&info, sizeof(info));
_______________________________________________
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