From 726315c5e17292754f45a7e21932ff0783087f35 Mon Sep 17 00:00:00 2001
From: ENGO150 <v.smejkal06@gmail.com>
Date: Wed, 4 May 2022 19:13:45 +0200
Subject: [PATCH] added missing deallocation of encryptedText

---
 src/app/main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/app/main.c b/src/app/main.c
index b0fa108..1cda354 100644
--- a/src/app/main.c
+++ b/src/app/main.c
@@ -1,4 +1,5 @@
 #include <stdio.h>
+#include <stdlib.h>
 
 #include <why2/encrypter.h>
 #include <why2/flags.h>
@@ -8,6 +9,7 @@
 int main(void)
 {
     setNoOutput(1);
+    char *encryptedText = encryptText(TEXT_TO_ENCRYPT, NULL);
 
     printf
     (
@@ -19,8 +21,9 @@ int main(void)
         "If you'd like to know more about WHY2 Encryption System, please visit: https://github.com/ENGO150/WHY2/wiki \n"
         "Thank you so much for supporting this project!\n"
 
-        , TEXT_TO_ENCRYPT, encryptText(TEXT_TO_ENCRYPT, NULL)
+        , TEXT_TO_ENCRYPT, encryptedText
     );
 
+    free(encryptedText);
     return 0;
 }
\ No newline at end of file