summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/drivers/bus/pci.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/drivers/bus/pci.c b/src/drivers/bus/pci.c
index 1f0ad5211..967441acd 100644
--- a/src/drivers/bus/pci.c
+++ b/src/drivers/bus/pci.c
@@ -245,11 +245,12 @@ static int pcibus_probe ( struct root_device *rootdev ) {
/* Allocate struct pci_device */
if ( ! pci )
- pci = zalloc ( sizeof ( *pci ) );
+ pci = malloc ( sizeof ( *pci ) );
if ( ! pci ) {
rc = -ENOMEM;
goto err;
}
+ memset ( pci, 0, sizeof ( *pci ) );
pci->bus = bus;
pci->devfn = devfn;