From 0d2c30d10adbf5e00c03ab168436390cc51af58c Mon Sep 17 00:00:00 2001 From: whantae jiwhantae ji Date: Mon, 17 Nov 2014 11:14:20 +0900 Subject: [PATCH] memset 0 --- symtab.c | 1 + 1 file changed, 1 insertion(+) diff --git a/symtab.c b/symtab.c index be9a095..dd35314 100644 --- a/symtab.c +++ b/symtab.c @@ -93,6 +93,7 @@ void st_insert( char * scope, char * name, ExpType type, int lineno, int loc ) l = l->next; if (l == NULL) /* scope not yet in table */ { l = (ScopeList) malloc(sizeof(struct ScopeListRec)); + memset(l, 0, sizeof(struct ScopeListRec)); l->parent = getParentScope(scope); l->name = (char *)malloc(sizeof(char) * (strlen(scope) + 1)); strcpy(l->name, scope);