Skip to content

Commit

Permalink
Merge pull request #215 from flaviojs/fix-memory-leaks-dev_c7200_pa_b…
Browse files Browse the repository at this point in the history
…ri_init

Fix memory leaks in dev_c7200_pa_bri_init.
  • Loading branch information
grossmj authored Apr 2, 2024
2 parents ec5cc5f + 813462b commit 4a2e6a3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions common/dev_c7200_bri.c
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,7 @@ int dev_c7200_pa_bri_init(vm_instance_t *vm,struct cisco_card *card)

if (!pci_dev) {
vm_error(vm,"%s: unable to create PCI device.\n",card->dev_name);
free(d);
return(-1);
}

Expand All @@ -827,6 +828,8 @@ int dev_c7200_pa_bri_init(vm_instance_t *vm,struct cisco_card *card)
/* Create the device itself */
if (!(dev = dev_create(card->dev_name))) {
vm_error(vm,"%s: unable to create device.\n",card->dev_name);
pci_dev_remove(d->pci_dev);
free(d);
return(-1);
}

Expand Down

0 comments on commit 4a2e6a3

Please sign in to comment.