X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=config%2Fzconf.l;h=04ee4431c3fe9d7868b0cdc104eb04bf38cad77d;hb=a423328607a8dfbf84e3b92cbde918a8bd7a8c8d;hp=a2b289519df6139ca2f029e50dba256d2f3b57b3;hpb=d1dbdf395b7ee5330b22008ba7c2cc704e157229;p=carl9170fw.git diff --git a/config/zconf.l b/config/zconf.l index a2b2895..04ee443 100644 --- a/config/zconf.l +++ b/config/zconf.l @@ -40,7 +40,7 @@ static void zconf_endfile(void); static void new_string(void) { - text = malloc(START_STRSIZE); + text = xmalloc(START_STRSIZE); text_asize = START_STRSIZE; text_size = 0; *text = 0; @@ -62,7 +62,7 @@ static void append_string(const char *str, int size) static void alloc_string(const char *str, int size) { - text = malloc(size + 1); + text = xmalloc(size + 1); memcpy(text, str, size); text[size] = 0; } @@ -288,7 +288,7 @@ void zconf_initscan(const char *name) exit(1); } - current_buf = malloc(sizeof(*current_buf)); + current_buf = xmalloc(sizeof(*current_buf)); memset(current_buf, 0, sizeof(*current_buf)); current_file = file_lookup(name); @@ -299,7 +299,7 @@ void zconf_nextfile(const char *name) { struct file *iter; struct file *file = file_lookup(name); - struct buffer *buf = malloc(sizeof(*buf)); + struct buffer *buf = xmalloc(sizeof(*buf)); memset(buf, 0, sizeof(*buf)); current_buf->state = YY_CURRENT_BUFFER;