diff options
Diffstat (limited to 'src/prc1/sym.c')
| -rw-r--r-- | src/prc1/sym.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/prc1/sym.c b/src/prc1/sym.c index 69d3bca..3ba2937 100644 --- a/src/prc1/sym.c +++ b/src/prc1/sym.c @@ -364,7 +364,7 @@ static const struct type *genlittype(struct prv *p) { const struct fn *fn = fn_cur(p); const char *tr = triplet(p); - const struct type *byte = type_find(fn, tr, "char"); + const struct type *byte = type_find(fn, tr, "char"), *ret; struct type *bytedup = NULL, *t = NULL; if (!byte) @@ -384,7 +384,10 @@ static const struct type *genlittype(struct prv *p) .child = bytedup }; - return p->ast->littype = type_insert(p, t); + if (!(ret = type_insert(p, t))) + goto failure; + + return p->ast->littype = ret; failure: free(t); |
