apps/smtp: Fix wrong sizeof for memset s->bodydh

Use sizeof(struct smtp_bodydh_state) to zero all fields of s->bodydh.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
This commit is contained in:
Axel Lin 2018-01-31 09:07:48 +08:00
parent 64a351cbe0
commit 2c3c578475

View File

@ -1483,7 +1483,7 @@ smtp_send_mail_bodycback(const char *from, const char* to, const char* subject,
SMTP_STATE_FREE(s);
return ERR_MEM;
}
memset(s->bodydh, 0, sizeof(struct smtp_bodydh));
memset(s->bodydh, 0, sizeof(struct smtp_bodydh_state));
/* initialize the structure */
s->from = from;
len = strlen(from);