summaryrefslogtreecommitdiff
path: root/sys/src/9/pc/mp.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@centraldogma>2011-12-12 16:55:26 +0100
committercinap_lenrek <cinap_lenrek@centraldogma>2011-12-12 16:55:26 +0100
commitbf3476d661e05208b78f70cdaa5656ff77264d23 (patch)
treef5c52910b93aa74586740a54f6b2911e95ae96cc /sys/src/9/pc/mp.c
parent589f99915eb95d9207c08259c8880675a0a502cf (diff)
kernel: fix inproper use of malloc/smalloc
Diffstat (limited to 'sys/src/9/pc/mp.c')
-rw-r--r--sys/src/9/pc/mp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/src/9/pc/mp.c b/sys/src/9/pc/mp.c
index e8316ac74..e10e6d9d1 100644
--- a/sys/src/9/pc/mp.c
+++ b/sys/src/9/pc/mp.c
@@ -225,6 +225,8 @@ mkiointr(PCMPintr* p)
if(memcmp(mppcmp->product, "INTEL X38MLST ", 20) == 0){
if(p->busno == 1 && p->intin == 16 && p->irq == 1){
pcmpintr = malloc(sizeof(PCMPintr));
+ if(pcmpintr == nil)
+ panic("iointr: no memory for PCMPintr");
memmove(pcmpintr, p, sizeof(PCMPintr));
print("mkiointr: %20.20s bus %d intin %d irq %d\n",
(char*)mppcmp->product,