From 973fde4697893eb15a205860a63249c3e70cd850 Mon Sep 17 00:00:00 2001 From: Derisis13 Date: Tue, 31 Aug 2021 20:44:10 +0200 Subject: [PATCH] Version 1.4.5 Bugfix: now function press_button doesn't leak memory --- moving.c | 1 + moving.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/moving.c b/moving.c index 8753ea3..07cb24b 100644 --- a/moving.c +++ b/moving.c @@ -50,6 +50,7 @@ void press_button (buttons b) fprintf (gpio, "1"); fclose (gpio); usleep (200000); + free (fname); } void lower (shutter *r) diff --git a/moving.h b/moving.h index fdfa317..58396e7 100644 --- a/moving.h +++ b/moving.h @@ -17,4 +17,4 @@ void reset (); //lowers the shutter to the percentage level described in the shutter structure void lower (shutter *r); -#endif //_MOZGATAS_H_ +#endif _MOZGATAS_H_