From 6662ba7c4bf910fde1bb49d0a63a0c9265ff5c3a Mon Sep 17 00:00:00 2001 From: Seppia Date: Thu, 5 Jul 2018 14:37:58 +0200 Subject: Missing memory deallocation input string was not properly deallocated if previously reallocated. --- src/onetimebluh.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/onetimebluh.c b/src/onetimebluh.c index 5754fdf..08f147d 100644 --- a/src/onetimebluh.c +++ b/src/onetimebluh.c @@ -283,6 +283,8 @@ void xor (Opts* opzioni) { if (opzioni->input) { fclose (mex); + } else if (!opzioni->input) { + free (input); } if (opzioni->output) { @@ -480,6 +482,8 @@ void bluh (Opts* opzioni) { if (opzioni->input) { fclose (mex); + } else if (!opzioni->input) { + free (input); } if (opzioni->output) { -- cgit v1.2.3