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

View file

@ -119,6 +119,8 @@ void receive_mail(struct mail_recv_t* rec){
write((rec->fds[1].fd), new_body, write((rec->fds[1].fd), new_body,
strlen(new_body)); strlen(new_body));
free(new_body); free(new_body);
rec->input_buffer = NULL;
rec->in_len = 0;
}else{ }else{
/* Write the original */ /* Write the original */
write((rec->fds[1].fd), write((rec->fds[1].fd),