struct replay_setup *replay_new_setup(void)
{
- return xcalloc(1, sizeof(struct replay_setup));
+ return xcalloc(1, sizeof(struct replay_setup));
+}
+
+void replay_free_setup(struct replay_setup *stp)
+{
+ if (!stp)
+ return;
+
+ free(stp->logs);
+ free(stp->step.name);
+ free(stp->step.value);
+ free(stp);
}
/* if timing file does not contains types of entries (old format) than use this
void replay_init_debug(void);
struct replay_setup *replay_new_setup(void);
-
+void replay_free_setup(struct replay_setup *stp);
int replay_set_default_type(struct replay_setup *stp, char type);
int replay_set_crmode(struct replay_setup *stp, int mode);
cb->child_sigstop = child_sigstop;
cb->mainloop = mainloop_cb;
- sigprocmask(SIG_BLOCK, NULL, ul_pty_get_orig_sigset(ss.pty));
-
if (ul_pty_setup(ss.pty))
err(EXIT_FAILURE, "failed to create pseudo-terminal");
}
ul_pty_cleanup(ss.pty);
- fprintf(stdout, _("\n>>> scriptlive: done. <<<\n"));
+ ul_free_pty(ss.pty);
+ replay_free_setup(ss.setup);
+ fprintf(stdout, _("\n>>> scriptlive: done. <<<\n"));
return EXIT_SUCCESS;
}
replay_get_timing_file(setup),
replay_get_timing_line(setup));
printf("\n");
+ replay_free_setup(setup);
+
exit(EXIT_SUCCESS);
}