summaryrefslogtreecommitdiff
path: root/symbol.c
diff options
context:
space:
mode:
Diffstat (limited to 'symbol.c')
-rw-r--r--symbol.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/symbol.c b/symbol.c
index 294d9a4..8bcaa13 100644
--- a/symbol.c
+++ b/symbol.c
@@ -16,7 +16,7 @@ getsym(Symtab *tab, Rune *name)
tab->nsyms++;
tab->syms = realloc(tab->syms, sizeof(Symbol *) * tab->nsyms);
- tab->syms[tab->nsyms-1] = malloc(sizeof(Symbol));
+ tab->syms[tab->nsyms-1] = emalloc(sizeof(Symbol));
tab->syms[tab->nsyms-1]->name = runestrdup(name);
tab->syms[tab->nsyms-1]->undefined = 1;
return tab->syms[tab->nsyms-1];
@@ -25,7 +25,7 @@ getsym(Symtab *tab, Rune *name)
Symtab *
newsymtab(void)
{
- Symtab *tab = malloc(sizeof(Symtab));
+ Symtab *tab = emalloc(sizeof(Symtab));
tab->nsyms = 0;
tab->syms = nil;