fixed memory leak in encrypter padding

This commit is contained in:
Václav Šmejkal 2024-11-21 17:11:17 +01:00
parent c5394e63e5
commit 994a2a8c4f
Signed by: ENGO150
GPG Key ID: 4A57E86482968843

View File

@ -136,6 +136,7 @@ why2_output_flags why2_encrypt_text(char *text, char *key)
buffer_2 = buffer; buffer_2 = buffer;
buffer = buffer -> next; //ITER buffer = buffer -> next; //ITER
why2_deallocate(buffer_2 -> value); //DEALLOCATION
why2_deallocate(buffer_2); //DEALLOCATION why2_deallocate(buffer_2); //DEALLOCATION
} while (buffer != NULL); } while (buffer != NULL);
} else text_new = why2_strdup(text); //USE TEXT WITHOUT PADDING } 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 //DEALLOCATION
why2_deallocate(text_key_chain); why2_deallocate(text_key_chain);
why2_deallocate(text_buffer); why2_deallocate(text_buffer);
why2_deallocate(text_new);
why2_reset_memory_identifier(); why2_reset_memory_identifier();