From c3aabc1a422cc262a6dae2b69d8332584b74dc3c Mon Sep 17 00:00:00 2001 From: Tyrolyean Date: Tue, 28 Apr 2020 20:06:26 +0200 Subject: [PATCH] Prevented double free Signed-off-by: Tyrolyean --- src/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.c b/src/main.c index e973f15..cdec583 100644 --- a/src/main.c +++ b/src/main.c @@ -119,6 +119,8 @@ void receive_mail(struct mail_recv_t* rec){ write((rec->fds[1].fd), new_body, strlen(new_body)); free(new_body); + rec->input_buffer = NULL; + rec->in_len = 0; }else{ /* Write the original */ write((rec->fds[1].fd),