(length_type): fail on malloc error
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8444 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -61,7 +61,7 @@ length_type (const char *name, const Type *t, const char *variable)
|
|||||||
char *s;
|
char *s;
|
||||||
asprintf(&s, "(const int*)%s", name);
|
asprintf(&s, "(const int*)%s", name);
|
||||||
if(s == NULL)
|
if(s == NULL)
|
||||||
return ENOMEM;
|
errx (1, "out of memory");
|
||||||
length_primitive ("integer", s, variable);
|
length_primitive ("integer", s, variable);
|
||||||
free(s);
|
free(s);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user