summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_hhook.c
diff options
context:
space:
mode:
authorlstewart <lstewart@FreeBSD.org>2011-01-11 01:11:07 +0000
committerlstewart <lstewart@FreeBSD.org>2011-01-11 01:11:07 +0000
commitc03ee1bb5569a41b3c03c483671423d361327490 (patch)
treefbbfd4372cb7a25b03ca0a00fe3b922f059b8c85 /sys/kern/kern_hhook.c
parent76b788457b39279da51daf8c31bf490fbbcaa2d0 (diff)
downloadFreeBSD-src-c03ee1bb5569a41b3c03c483671423d361327490.zip
FreeBSD-src-c03ee1bb5569a41b3c03c483671423d361327490.tar.gz
Fix hhook_head_is_virtualised() so that "ret" can't be used uninitialised.
Sponsored by: FreeBSD Foundation Submitted by: pjd MFC after: 9 weeks X-MFC with: r216615
Diffstat (limited to 'sys/kern/kern_hhook.c')
-rw-r--r--sys/kern/kern_hhook.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/kern/kern_hhook.c b/sys/kern/kern_hhook.c
index f2d8592..443a787 100644
--- a/sys/kern/kern_hhook.c
+++ b/sys/kern/kern_hhook.c
@@ -380,11 +380,12 @@ hhook_head_is_virtualised(struct hhook_head *hhh)
{
uint32_t ret;
- if (hhh == NULL)
- return (0);
+ ret = 0;
- if (hhh->hhh_flags & HHH_ISINVNET)
- ret = HHOOK_HEADISINVNET;
+ if (hhh != NULL) {
+ if (hhh->hhh_flags & HHH_ISINVNET)
+ ret = HHOOK_HEADISINVNET;
+ }
return (ret);
}
OpenPOWER on IntegriCloud