libpci: Use calloc()

Update #2133.
This commit is contained in:
Sebastian Huber
2017-08-25 11:01:15 +02:00
parent a97d77c187
commit 76b9c313ac

View File

@@ -26,9 +26,8 @@ struct pci_dev *pci_dev_create(int isbus)
else
size = sizeof(struct pci_dev);
ptr = malloc(size);
ptr = calloc(1, size);
if (!ptr)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
memset(ptr, 0, size);
return ptr;
}