Prevented double free

Signed-off-by: Tyrolyean <tyrolyean@tyrolyean.net>
This commit is contained in:
Tyrolyean 2020-04-28 20:06:26 +02:00
parent 4e8956f848
commit c3aabc1a42
No known key found for this signature in database
GPG Key ID: 81EC9BAC5E9667C6
1 changed files with 2 additions and 0 deletions

View File

@ -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),