After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 786514 - Network: segfault when trying to show a wireless device from CLI
Network: segfault when trying to show a wireless device from CLI
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Network
3.25.x
Other Linux
: Normal blocker
: ---
Assigned To: Georges Basile Stavracas Neto
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-08-19 14:32 UTC by Alexander Mikhaylenko
Modified: 2017-08-29 21:12 UTC
See Also:
GNOME target: ---
GNOME version: 3.25/3.26


Attachments
stacktrace (13.21 KB, text/plain)
2017-08-19 14:32 UTC, Alexander Mikhaylenko
  Details
network: Don't unref device after when parsing arguments (1.22 KB, patch)
2017-08-29 08:19 UTC, Georges Basile Stavracas Neto
committed Details | Review

Description Alexander Mikhaylenko 2017-08-19 14:32:41 UTC
Created attachment 357976 [details]
stacktrace

Command to launch:
gnome-control-center network show-device /org/freedesktop/NetworkManager/devices/3
Comment 1 Georges Basile Stavracas Neto 2017-08-29 08:19:22 UTC
Created attachment 358655 [details] [review]
network: Don't unref device after when parsing arguments

When we add the NetDevice pointer to the GPtrArray, we have
a single reference owned by the panel. When iterating over
this GPtrArray, no reference is taken.

The problem is that the code to handle command-line arguments
was unreferencing the NetDevices when iterating over it,
creating a disparity in the ref/unref pairs.

Fix that by simply not unreferencing the NetDevice instance
when iterating over it.
Comment 2 Rui Matos 2017-08-29 08:49:01 UTC
Review of attachment 358655 [details] [review]:

lgtm, thanks
Comment 3 Georges Basile Stavracas Neto 2017-08-29 21:12:19 UTC
Thanks for the review.

Attachment 358655 [details] pushed as 5a3b19e - network: Don't unref device after when parsing arguments