Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libconnman-qt] Fix NetworkTechnology objects removal #13

Merged
merged 1 commit into from Dec 14, 2022

Conversation

elros34
Copy link
Contributor

@elros34 elros34 commented Dec 5, 2022

Before NetworkManager::technologyRemoved is called there is NetworkTechnology::technologyRemoved which destroys interface (delete m_technology) so objPath() returns QString(). This leads to memory leak and flood of dbus GetProperties messages increasing on every technology add/remove.

Before NetworkManager::technologyRemoved is called there is NetworkTechnology::technologyRemoved which destroys interface (delete m_technology) so objPath() returns QString(). This leads to memory leak and flood of dbus GetProperties messages increasing on every technology add/remove.
@spiiroin
Copy link

spiiroin commented Dec 7, 2022

@pvuorela @LaakkonenJussi can you take a look at this?

Copy link
Member

@llewelld llewelld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nice find. I wasn't able to test the failing case, but the code change looks sensible to me.

I tried to think of ways that objPath() might differ from path(), but struggled to find any other than in this particular case. The situation where an empty path is set seems to be a special case, but not one that this change affects. So this LGTM.

Copy link
Contributor

@LaakkonenJussi LaakkonenJussi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@llewelld llewelld merged commit 8c19716 into sailfishos:master Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants