From 994a2a8c4f4e55067ae8ebfb94a108cf76977b8e Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Thu, 21 Nov 2024 17:11:17 +0100 Subject: [PATCH] fixed memory leak in encrypter padding --- src/core/lib/encrypter.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/lib/encrypter.c b/src/core/lib/encrypter.c index e210d0a..1e253a0 100644 --- a/src/core/lib/encrypter.c +++ b/src/core/lib/encrypter.c @@ -136,6 +136,7 @@ why2_output_flags why2_encrypt_text(char *text, char *key) buffer_2 = buffer; buffer = buffer -> next; //ITER + why2_deallocate(buffer_2 -> value); //DEALLOCATION why2_deallocate(buffer_2); //DEALLOCATION } while (buffer != NULL); } else text_new = why2_strdup(text); //USE TEXT WITHOUT PADDING @@ -221,6 +222,7 @@ why2_output_flags why2_encrypt_text(char *text, char *key) //DEALLOCATION why2_deallocate(text_key_chain); why2_deallocate(text_buffer); + why2_deallocate(text_new); why2_reset_memory_identifier();