summaryrefslogtreecommitdiffstats
path: root/sys/geom/raid3
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2005-05-11 19:35:43 +0000
committerpjd <pjd@FreeBSD.org>2005-05-11 19:35:43 +0000
commit0e95eeadc251d5dd91461e62b11161c89efca7cd (patch)
treedfcf38b7f13eb8da2dc6e0932dc07fe372d5d477 /sys/geom/raid3
parentf66a55ffcd2d4c04e32ef91c6956a27a8a509e0f (diff)
downloadFreeBSD-src-0e95eeadc251d5dd91461e62b11161c89efca7cd.zip
FreeBSD-src-0e95eeadc251d5dd91461e62b11161c89efca7cd.tar.gz
gp can't be NULL.
Noticed by: Coverity Prevent analysis tool
Diffstat (limited to 'sys/geom/raid3')
-rw-r--r--sys/geom/raid3/g_raid3_ctl.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/sys/geom/raid3/g_raid3_ctl.c b/sys/geom/raid3/g_raid3_ctl.c
index 4ac04e0..a38f007 100644
--- a/sys/geom/raid3/g_raid3_ctl.c
+++ b/sys/geom/raid3/g_raid3_ctl.c
@@ -459,16 +459,14 @@ g_raid3_ctl_insert(struct gctl_req *req, struct g_class *mp)
if (error != 0)
gctl_error(req, "Cannot store metadata on %s.", pp->name);
end:
- if (gp != NULL) {
- if (cp != NULL) {
- if (cp->acw > 0)
- g_access(cp, 0, -1, -1);
- if (cp->provider != NULL)
- g_detach(cp);
- g_destroy_consumer(cp);
- }
- g_destroy_geom(gp);
- }
+ if (cp != NULL) {
+ if (cp->acw > 0)
+ g_access(cp, 0, -1, -1);
+ if (cp->provider != NULL)
+ g_detach(cp);
+ g_destroy_consumer(cp);
+ }
+ g_destroy_geom(gp);
}
static void
OpenPOWER on IntegriCloud