diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2014-10-14 09:52:27 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2014-10-14 09:52:27 +0000 |
commit | d2088c987301043e5adabf301336b772e26f4fb5 (patch) | |
tree | 15644a2345729ab10b6608a3790f4a1dd288d347 /sys/net/if_gre.c | |
parent | ba2e5af52d741397cb16517924af6926417af217 (diff) |
Use rtfree() instead of RTFREE(), NULLify some free'd route pointers and
kill the macro.
ok mikeb@, henning@
Diffstat (limited to 'sys/net/if_gre.c')
-rw-r--r-- | sys/net/if_gre.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c index 7eb3ab496d3..980c7a31462 100644 --- a/sys/net/if_gre.c +++ b/sys/net/if_gre.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_gre.c,v 1.70 2014/07/22 11:06:09 mpi Exp $ */ +/* $OpenBSD: if_gre.c,v 1.71 2014/10/14 09:52:25 mpi Exp $ */ /* $NetBSD: if_gre.c,v 1.9 1999/10/25 19:18:11 drochner Exp $ */ /* @@ -519,8 +519,10 @@ gre_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) recompute: if ((sc->g_src.s_addr != INADDR_ANY) && (sc->g_dst.s_addr != INADDR_ANY)) { - if (sc->route.ro_rt != 0) - RTFREE(sc->route.ro_rt); + if (sc->route.ro_rt != NULL) { + rtfree(sc->route.ro_rt); + sc->route.ro_rt = NULL; + } /* ip_output() will do the lookup */ bzero(&sc->route, sizeof(sc->route)); ifp->if_flags |= IFF_UP; |