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 751095 - power: Fix possible crash if up_client_get_devices() fails
power: Fix possible crash if up_client_get_devices() fails
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Power
unspecified
Other All
: Normal normal
: ---
Assigned To: Richard Hughes
Control-Center Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-06-17 08:54 UTC by Bastien Nocera
Modified: 2015-06-29 15:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
power: Fix possible crash if up_client_get_devices() fails (1.10 KB, patch)
2015-06-17 08:55 UTC, Bastien Nocera
committed Details | Review

Description Bastien Nocera 2015-06-17 08:54:51 UTC
.
Comment 1 Bastien Nocera 2015-06-17 08:55:07 UTC
Created attachment 305462 [details] [review]
power: Fix possible crash if up_client_get_devices() fails

up_client_get_devices() can fail if upower crashes or isn't available.
Make sure not to crash ourselves by handling NULL return values as we do
later in the loop.

See https://bugzilla.redhat.com/show_bug.cgi?id=1175421
Comment 2 Richard Hughes 2015-06-22 08:20:08 UTC
Review of attachment 305462 [details] [review]:

Looks fine, thanks.
Comment 3 Bastien Nocera 2015-06-29 15:50:34 UTC
Attachment 305462 [details] pushed as d2c0b66 - power: Fix possible crash if up_client_get_devices() fails