static void clear_stack(void) {
for (int c = 0; c < 10; c++) {
- if (stack[c].type == STACK_STR && stack[c].val.str != NULL)
+ if (stack[c].type == STACK_STR)
free(stack[c].val.str);
stack[c].identifier = NULL;
stack[c].val.str = NULL;
/* read the script’s output */
int conv_size = 65535;
- char *converted = smalloc(conv_size);
+ char *converted = scalloc(conv_size, 1);
int read_bytes = 0, ret;
do {
if (read_bytes == conv_size) {