mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
Fix some memory leaks.
This commit is contained in:
parent
920805bbd0
commit
2c56bf1495
7 changed files with 19 additions and 1 deletions
|
|
@ -34,6 +34,8 @@ LINPHONE_BEGIN_NAMESPACE
|
|||
// -----------------------------------------------------------------------------
|
||||
|
||||
void AddressPrivate::setInternalAddress (const SalAddress *addr) {
|
||||
if (internalAddress)
|
||||
sal_address_unref(internalAddress);
|
||||
internalAddress = sal_address_clone(addr);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,11 @@ LocalConference::LocalConference (const shared_ptr<Core> &core, const IdentityAd
|
|||
d->eventHandler.reset(new LocalConferenceEventHandler(this));
|
||||
}
|
||||
|
||||
LocalConference::~LocalConference () {
|
||||
L_D();
|
||||
d->eventHandler.reset();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
void LocalConference::addParticipant (const IdentityAddress &addr, const CallSessionParams *params, bool hasMedia) {
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ class LocalConference : public Conference {
|
|||
|
||||
public:
|
||||
LocalConference (const std::shared_ptr<Core> &core, const IdentityAddress &myAddress, CallSessionListener *listener);
|
||||
virtual ~LocalConference ();
|
||||
|
||||
/* ConferenceInterface */
|
||||
void addParticipant (const IdentityAddress &addr, const CallSessionParams *params, bool hasMedia) override;
|
||||
|
|
|
|||
|
|
@ -37,6 +37,11 @@ RemoteConference::RemoteConference (
|
|||
d->eventHandler.reset(new RemoteConferenceEventHandler(this));
|
||||
}
|
||||
|
||||
RemoteConference::~RemoteConference () {
|
||||
L_D();
|
||||
d->eventHandler.reset();
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
void RemoteConference::addParticipant (const IdentityAddress &addr, const CallSessionParams *params, bool hasMedia) {
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ class LINPHONE_PUBLIC RemoteConference : public Conference, public ConferenceLis
|
|||
|
||||
public:
|
||||
RemoteConference (const std::shared_ptr<Core> &core, const IdentityAddress &myAddress, CallSessionListener *listener);
|
||||
virtual ~RemoteConference ();
|
||||
|
||||
/* ConferenceInterface */
|
||||
void addParticipant (const IdentityAddress &addr, const CallSessionParams *params, bool hasMedia) override;
|
||||
|
|
|
|||
|
|
@ -1252,7 +1252,9 @@ static void register_get_gruu(void) {
|
|||
if(cfg) {
|
||||
const LinphoneAddress *addr = linphone_proxy_config_get_contact(cfg);
|
||||
BC_ASSERT_PTR_NOT_NULL(addr);
|
||||
BC_ASSERT_PTR_NOT_NULL(strstr(linphone_address_as_string_uri_only(addr), "gr"));
|
||||
char *addrStr = linphone_address_as_string_uri_only(addr);
|
||||
BC_ASSERT_PTR_NOT_NULL(strstr(addrStr, "gr"));
|
||||
bctbx_free(addrStr);
|
||||
}
|
||||
linphone_core_manager_destroy(marie);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -489,6 +489,8 @@ void linphone_core_manager_uninit(LinphoneCoreManager *mgr) {
|
|||
if (mgr->identity) {
|
||||
linphone_address_unref(mgr->identity);
|
||||
}
|
||||
if (mgr->rc_path)
|
||||
bctbx_free(mgr->rc_path);
|
||||
|
||||
manager_count--;
|
||||
linphone_core_set_log_level(old_log_level);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue