summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJeremie Courreges-Anglas <jca@cvs.openbsd.org>2020-04-14 07:38:22 +0000
committerJeremie Courreges-Anglas <jca@cvs.openbsd.org>2020-04-14 07:38:22 +0000
commit6a1be1bbcae25e59bc5be6768e506e4fb93e571a (patch)
tree4af86a9f3bfbf051789b609176bdf2f98e893f2a /sys/dev
parentb970d9468956c6057b2263f6bafee1faf4622e8c (diff)
Prevent uninitialized use of bbs and bls in the error path
Harmless since free(9) first checks that the pointer is not NULL. ok krw@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/softraid.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c
index 8b3bc7e1fa1..dce30576d1b 100644
--- a/sys/dev/softraid.c
+++ b/sys/dev/softraid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid.c,v 1.400 2020/04/06 16:29:53 visa Exp $ */
+/* $OpenBSD: softraid.c,v 1.401 2020/04/14 07:38:21 jca Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org>
@@ -3666,7 +3666,7 @@ sr_ioctl_installboot(struct sr_softc *sc, struct sr_discipline *sd,
struct sr_meta_opt_item *omi;
struct sr_meta_boot *sbm;
struct disk *dk;
- u_int32_t bbs, bls, secsize;
+ u_int32_t bbs = 0, bls = 0, secsize;
u_char duid[8];
int rv = EINVAL;
int i;