瀏覽代碼

Revert "convert to zalloc"

This reverts commit 5ce16b03a1.
tags/v0.9.3
Holger Lubitz 17 年之前
父節點
當前提交
a772dc4a2a
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2
    1
      src/drivers/bus/pci.c

+ 2
- 1
src/drivers/bus/pci.c 查看文件

@@ -245,11 +245,12 @@ static int pcibus_probe ( struct root_device *rootdev ) {
245 245
 
246 246
 			/* Allocate struct pci_device */
247 247
 			if ( ! pci )
248
-				pci = zalloc ( sizeof ( *pci ) );
248
+				pci = malloc ( sizeof ( *pci ) );
249 249
 			if ( ! pci ) {
250 250
 				rc = -ENOMEM;
251 251
 				goto err;
252 252
 			}
253
+			memset ( pci, 0, sizeof ( *pci ) );
253 254
 			pci->bus = bus;
254 255
 			pci->devfn = devfn;
255 256
 			

Loading…
取消
儲存