summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorqingli <qingli@FreeBSD.org>2008-04-24 05:04:52 +0000
committerqingli <qingli@FreeBSD.org>2008-04-24 05:04:52 +0000
commit53e28a2a3ad9d4b91d7ee258cbd6668dd7a412e5 (patch)
tree12685f3dbf508266e8e103296ca6da016ab0e245 /sys/net
parent059d045f2e8bfb4882fcc9036670de0c5a2de84c (diff)
downloadFreeBSD-src-53e28a2a3ad9d4b91d7ee258cbd6668dd7a412e5.zip
FreeBSD-src-53e28a2a3ad9d4b91d7ee258cbd6668dd7a412e5.tar.gz
In function rtalloc_mpath(), do not try to release the lock if the ro_rt
pointer is NULL. Reported by: (pluknet at gmail dot com)
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/radix_mpath.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/radix_mpath.c b/sys/net/radix_mpath.c
index 98d7d6c..d1db258 100644
--- a/sys/net/radix_mpath.c
+++ b/sys/net/radix_mpath.c
@@ -269,7 +269,9 @@ rtalloc_mpath(struct route *ro, int hash)
ro->ro_rt = rtalloc1(&ro->ro_dst, 1, 0UL);
/* if the route does not exist or it is not multipath, don't care */
- if (!ro->ro_rt || !rn_mpath_next((struct radix_node *)ro->ro_rt)) {
+ if (ro->ro_rt == NULL)
+ return;
+ if (rn_mpath_next((struct radix_node *)ro->ro_rt) == NULL) {
RT_UNLOCK(ro->ro_rt);
return;
}
OpenPOWER on IntegriCloud