summaryrefslogtreecommitdiff
path: root/usr.bin/asn1_compile/gen.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/asn1_compile/gen.c')
-rw-r--r--usr.bin/asn1_compile/gen.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/asn1_compile/gen.c b/usr.bin/asn1_compile/gen.c
index 2843f29be56..929686bc838 100644
--- a/usr.bin/asn1_compile/gen.c
+++ b/usr.bin/asn1_compile/gen.c
@@ -430,7 +430,8 @@ generate_type (const Symbol *s)
struct import *i;
char *filename;
- asprintf (&filename, "%s_%s.x", STEM, s->gen_name);
+ if (asprintf (&filename, "%s_%s.x", STEM, s->gen_name) == -1)
+ err (1, NULL);
codefile = fopen (filename, "w");
if (codefile == NULL)
err (1, "fopen %s", filename);