summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-10-20 17:22:14 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-10-20 17:22:14 +0000
commit329055b02bdb42b2d649e8711efb65d24c82ab78 (patch)
treebccafde61355c10c45d415a9dca810a163c8ac94 /sys
parent9479dd95535ac223a25f6af2c752f60169af51ba (diff)
check strdup failure; nimadeus@pandora.be
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/microcode/aic7xxx/aicasm_symbol.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/microcode/aic7xxx/aicasm_symbol.c b/sys/dev/microcode/aic7xxx/aicasm_symbol.c
index 1893e050405..32d793b5ef8 100644
--- a/sys/dev/microcode/aic7xxx/aicasm_symbol.c
+++ b/sys/dev/microcode/aic7xxx/aicasm_symbol.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aicasm_symbol.c,v 1.7 2003/08/28 02:24:04 krw Exp $ */
+/* $OpenBSD: aicasm_symbol.c,v 1.8 2003/10/20 17:22:13 deraadt Exp $ */
/*
* Aic7xxx SCSI host adapter firmware asssembler symbol table implementation
*
@@ -67,7 +67,8 @@ symbol_create(name)
exit(EX_SOFTWARE);
}
memset(new_symbol, 0, sizeof(*new_symbol));
- new_symbol->name = strdup(name);
+ if ((new_symbol->name = strdup(name)) == NULL)
+ stop("strdup failed", EX_SOFTWARE);
new_symbol->type = UNINITIALIZED;
return (new_symbol);
}