mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-21 21:28:08 +00:00
fix(ContentManager): avoid memory leak in contentListToMultipart
This commit is contained in:
parent
94abc31172
commit
6fcc907636
1 changed files with 4 additions and 3 deletions
|
|
@ -71,12 +71,13 @@ Content ContentManager::contentListToMultipart (const list<Content *> &contents)
|
|||
sal_body_handler_set_type(sbh, ContentType::Multipart.getType().c_str());
|
||||
sal_body_handler_set_subtype(sbh, ContentType::Multipart.getSubType().c_str());
|
||||
sal_body_handler_set_content_type_parameter(sbh, "boundary", MultipartBoundary);
|
||||
|
||||
LinphoneContent *cContent = linphone_content_from_sal_body_handler(sbh);
|
||||
Content *content = L_GET_CPP_PTR_FROM_C_OBJECT(cContent);
|
||||
Content returnContent = *content;
|
||||
belle_sip_object_unref(mpbh);
|
||||
|
||||
return returnContent;
|
||||
Content content = *L_GET_CPP_PTR_FROM_C_OBJECT(cContent);
|
||||
linphone_content_unref(cContent);
|
||||
return content;
|
||||
}
|
||||
|
||||
LINPHONE_END_NAMESPACE
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue