diff options
-rw-r--r-- | cpukit/libpci/pci_dev_create.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/cpukit/libpci/pci_dev_create.c b/cpukit/libpci/pci_dev_create.c index 51c1536f28..4e84397214 100644 --- a/cpukit/libpci/pci_dev_create.c +++ b/cpukit/libpci/pci_dev_create.c @@ -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; } |