Check pointer for NULL before dereferencing it, not after.
PR: 138384 Submitted by: Patroklos Argyroudis <argp@census-labs.com> MFC after: 1 week
This commit is contained in:
parent
cc204586da
commit
8d08f24520
@ -192,10 +192,10 @@ ipsd_dump(void *arg, void *virtual, vm_offset_t physical, off_t offset,
|
||||
|
||||
dp = arg;
|
||||
dsc = dp->d_drv1;
|
||||
sc = dsc->sc;
|
||||
|
||||
if (dsc == NULL)
|
||||
return (EINVAL);
|
||||
sc = dsc->sc;
|
||||
|
||||
if (ips_get_free_cmd(sc, &command, 0) != 0) {
|
||||
printf("ipsd: failed to get cmd for dump\n");
|
||||
|
Loading…
Reference in New Issue
Block a user