Skip to content

Commit

Permalink
Merge pull request #223 from flaviojs/fix-null-dereference-dev_c7200_…
Browse files Browse the repository at this point in the history
…pa_mc8te1_init

Fix NULL dereference in dev_c7200_pa_mc8te1_init.
  • Loading branch information
grossmj authored Apr 3, 2024
2 parents d79f47e + 44777f8 commit 7174dca
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions common/dev_pa_mc8te1.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,10 @@ int dev_c7200_pa_mc8te1_init(vm_instance_t *vm,struct cisco_card *card)
d->plx_obj = dev_plx9054_init(vm,d->plx_name,
card->pci_bus,1,
&d->ssram_dev,NULL);
if (d->plx_obj == NULL) {
dev_c7200_pa_mc8te1_shutdown(vm, card);
return(-1);
}

/* Set callback function for PLX9054 PCI-To-Local doorbell */
dev_plx_set_pci2loc_doorbell_cbk(d->plx_obj->data,
Expand Down

0 comments on commit 7174dca

Please sign in to comment.