diff options
author | pjd <pjd@FreeBSD.org> | 2005-05-11 19:36:56 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2005-05-11 19:36:56 +0000 |
commit | 0a798a236dd3c56e0a29573dcca5c6e1c512602b (patch) | |
tree | 6b0b4a93e6473e52cd58e3deef8b44b15665a3a4 /sys/geom/raid3 | |
parent | 0e95eeadc251d5dd91461e62b11161c89efca7cd (diff) | |
download | FreeBSD-src-0a798a236dd3c56e0a29573dcca5c6e1c512602b.zip FreeBSD-src-0a798a236dd3c56e0a29573dcca5c6e1c512602b.tar.gz |
cp 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.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/geom/raid3/g_raid3_ctl.c b/sys/geom/raid3/g_raid3_ctl.c index a38f007..2edbe46 100644 --- a/sys/geom/raid3/g_raid3_ctl.c +++ b/sys/geom/raid3/g_raid3_ctl.c @@ -459,13 +459,11 @@ 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 (cp != NULL) { - if (cp->acw > 0) - g_access(cp, 0, -1, -1); - if (cp->provider != NULL) - g_detach(cp); - g_destroy_consumer(cp); - } + 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); } |