From a975973d8b3d4dfdc7ec737daa530d6ec5896d3f Mon Sep 17 00:00:00 2001 From: Qing Li Date: Thu, 24 Apr 2008 05:04:52 +0000 Subject: [PATCH] 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) --- sys/net/radix_mpath.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/net/radix_mpath.c b/sys/net/radix_mpath.c index 98d7d6c430b0..d1db258043b4 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; }