=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/asn1_compile/Attic/gen.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- src/usr.bin/asn1_compile/Attic/gen.c 2003/05/11 21:36:33 1.1 +++ src/usr.bin/asn1_compile/Attic/gen.c 2005/03/08 03:05:07 1.2 @@ -61,7 +61,7 @@ { struct import *tmp = malloc (sizeof(*tmp)); if(tmp == NULL) - errx(1, "Out of memory"); + err(1, NULL); tmp->module = module; tmp->next = imports; @@ -79,8 +79,13 @@ { orig_filename = filename; if(base) - asprintf(&headerbase, "%s", base); + if((headerbase = strdup(base)) == NULL) + err(1, NULL); + asprintf(&header, "%s.h", headerbase); + if(header == NULL) + err(1, NULL); + headerfile = fopen (header, "w"); if (headerfile == NULL) err (1, "open %s", header);