diff options
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/mfiutil/mfi_config.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/usr.sbin/mfiutil/mfi_config.c b/usr.sbin/mfiutil/mfi_config.c index f6f1a9d..ba6ce2d 100644 --- a/usr.sbin/mfiutil/mfi_config.c +++ b/usr.sbin/mfiutil/mfi_config.c @@ -348,6 +348,7 @@ parse_array(int fd, int raid_type, char *array_str, struct array_info *info) error = mfi_lookup_drive(fd, cp, &device_id); if (error) { free(info->drives); + info->drives = NULL; return (error); } @@ -355,12 +356,14 @@ parse_array(int fd, int raid_type, char *array_str, struct array_info *info) error = errno; warn("Failed to fetch drive info for drive %s", cp); free(info->drives); + info->drives = NULL; return (error); } if (pinfo->fw_state != MFI_PD_STATE_UNCONFIGURED_GOOD) { warnx("Drive %u is not available", device_id); free(info->drives); + info->drives = NULL; return (EINVAL); } } |