From 87496e8d6b3c302de760418a067dc941da30f28d Mon Sep 17 00:00:00 2001 From: Adam Spragg Date: Sat, 17 Dec 2022 21:48:18 +0000 Subject: Free the valve input regex on exit --- 16.c | 3 +++ 1 file changed, 3 insertions(+) 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; } -- cgit v1.2.1