diff options
author | lstewart <lstewart@FreeBSD.org> | 2011-01-11 01:11:07 +0000 |
---|---|---|
committer | lstewart <lstewart@FreeBSD.org> | 2011-01-11 01:11:07 +0000 |
commit | c03ee1bb5569a41b3c03c483671423d361327490 (patch) | |
tree | fbbfd4372cb7a25b03ca0a00fe3b922f059b8c85 | |
parent | 76b788457b39279da51daf8c31bf490fbbcaa2d0 (diff) | |
download | FreeBSD-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
-rw-r--r-- | sys/kern/kern_hhook.c | 9 |
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); } |