summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorjohannes <johannes.herman@gmail.com>2024-03-03 16:55:50 +0100
committerjohannes <johannes.herman@gmail.com>2024-03-03 16:55:50 +0100
commit150790c84f1773cfc82b13953d7894cd25474a83 (patch)
treee48ea734979e4e0111a4c26172887e4afeb232b2 /src/main.c
parent9a14ce4b99dea312fe508153d6d8ccc56c27c69a (diff)
added freeargs
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 085e416..2889601 100644
--- a/src/main.c
+++ b/src/main.c
@@ -50,7 +50,10 @@ void setdemo(arg *argument)
{
demofile = fopen(argument->opts[0], "r");
if (!demofile)
- exitperror("Error: failed to open demofile, reason");
+ {
+ fprintf(stderr, "Error: failed to open demofile '%s', ", argument->opts[0]);
+ exitperror("reason");
+ }
if (readdemo(demofile, &DEMO) < 0)
{
fprintf(stderr, "Error: failed to parse demo\n");
@@ -207,5 +210,7 @@ int main(int argc, char *argv[])
if (outarg)
runoutput(outarg);
+ freeargs();
+
exit(EXIT_SUCCESS);
}