diff options
author | Jared Yanovich <jaredy@cvs.openbsd.org> | 2005-05-11 19:45:51 +0000 |
---|---|---|
committer | Jared Yanovich <jaredy@cvs.openbsd.org> | 2005-05-11 19:45:51 +0000 |
commit | bf0fb0dd24dc15dea7cfa018aac1ca44c8aab984 (patch) | |
tree | 20b97ea4f99e7ce6d87eff43df7c10c5eeacc31e /usr.bin/asn1_compile/hash.c | |
parent | da5aa746a14ecbe5b33033f82aeb9a5db51432f2 (diff) |
allocation failure checks; ok otto, moritz
Diffstat (limited to 'usr.bin/asn1_compile/hash.c')
-rw-r--r-- | usr.bin/asn1_compile/hash.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/asn1_compile/hash.c b/usr.bin/asn1_compile/hash.c index 80ad0f6f66a..8f954615e71 100644 --- a/usr.bin/asn1_compile/hash.c +++ b/usr.bin/asn1_compile/hash.c @@ -55,12 +55,12 @@ hashtabnew(int sz, assert(sz > 0); htab = (Hashtab *) malloc(sizeof(Hashtab) + (sz - 1) * sizeof(Hashentry *)); - for (i = 0; i < sz; ++i) - htab->tab[i] = NULL; if (htab == NULL) { return NULL; } else { + for (i = 0; i < sz; ++i) + htab->tab[i] = NULL; htab->cmp = cmp; htab->hash = hash; htab->sz = sz; |