diff options
author | Tucker Evans <tuckerevans24@gmail.com> | 2019-09-30 13:26:59 -0400 |
---|---|---|
committer | Tucker Evans <tuckerevans24@gmail.com> | 2019-10-04 13:17:51 -0400 |
commit | 4c71083b074b5af0493d540bf8b971b2dc07311a (patch) | |
tree | d217e862470c2714d8a72d0115b29832e490265d /pc.y | |
parent | e398b0beb33047b22a73d2d6a4302996dcdda67a (diff) |
Fix func_info members initialized after malloc
Diffstat (limited to 'pc.y')
-rw-r--r-- | pc.y | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -219,6 +219,7 @@ sub_prog_head tmp->func_info = malloc(sizeof(struct fi)); assert(tmp->func_info); + tmp->func_info->argv = NULL; tmp->func_info->argc = i; assert(tmp->func_info->argv = malloc(i * sizeof(int))); @@ -247,7 +248,9 @@ sub_prog_head tmp->func_info = malloc(sizeof(struct fi)); assert(tmp->func_info); + tmp->func_info->argv = NULL; tmp->func_info->argc = i; + assert(tmp->func_info->argv = malloc(i * sizeof(int))); assert(!set_func_types($3, tmp->func_info->argv, i)); |