summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Spragg <adam@spra.gg>2022-12-17 21:48:18 +0000
committerAdam Spragg <adam@spra.gg>2022-12-17 21:48:18 +0000
commit87496e8d6b3c302de760418a067dc941da30f28d (patch)
tree41f9a99adfbc1d22557a270a9678b5dbbbd55e51
parent12d66063019b65f6ecc0597873c79dc75ea3d88e (diff)
Free the valve input regex on exit
-rw-r--r--16.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/16.c b/16.c
index 79b15de..a36810c 100644
--- a/16.c
+++ b/16.c
@@ -248,6 +248,7 @@ main(int argc, char ** argv)
break;
default:
+ regfree(&valvein);
return -1;
}
}
@@ -294,6 +295,7 @@ main(int argc, char ** argv)
for (v = valves; v < valves + nvalves; ++v)
valve_dtor(v);
free(valves);
+ regfree(&valvein);
return -1;
}
@@ -354,6 +356,7 @@ main(int argc, char ** argv)
for (v = valves; v < valves + nvalves; ++v)
valve_dtor(v);
free(valves);
+ regfree(&valvein);
return 0;
}