mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
MFC of 198329: Check pointer for NULL before dereferencing it, not after.
This commit is contained in:
parent
fc946fd026
commit
82d11b0301
1 changed files with 1 additions and 1 deletions
|
|
@ -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 a new issue