Native function email_free_attachment_data uses free() to release allocated
memory pointing by tmp. Thus, we should call calloc() instead of structure's
constructor.
Messaging-email TCT passed 100%.
Change-Id: Ib81f1da2e0270cfa76aef0eab7005d968c1f102c
Signed-off-by: Szymon Jastrzebski <s.jastrzebsk@partner.samsung.com>
PlatformResult ret = copyFileToTemp(att->getFilePath(), &dirPath);
if (ret.IsError()) return ret;
- email_attachment_data_t* tmp = new email_attachment_data_t();
+ email_attachment_data_t* tmp = (email_attachment_data_t*)calloc(1, sizeof(email_attachment_data_t));
tmp->attachment_name = strdup(att->getShortFileName().c_str());
tmp->attachment_path = strdup(std::string(dirPath + "/"
+ att->getShortFileName()).c_str());