Commit 2c56bf14 authored by Ghislain MARY's avatar Ghislain MARY

Fix some memory leaks.

parent 920805bb
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment