catch error from as.*printf

This commit is contained in:
Love Hornquist Astrand
2010-05-30 13:37:07 -07:00
parent 788189805c
commit 077357c848
6 changed files with 23 additions and 16 deletions

View File

@@ -588,7 +588,9 @@ check_section(krb5_context context, const char *path, krb5_config_section *cf,
char *local;
for(p = cf; p != NULL; p = p->next) {
asprintf(&local, "%s/%s", path, p->name);
local = NULL;
if (asprintf(&local, "%s/%s", path, p->name) < 0 || local == NULL)
errx(1, "out of memory");
for(e = entries; e->name != NULL; e++) {
if(*e->name == '\0' || strcmp(e->name, p->name) == 0) {
if(e->type != p->type) {