GNOME Bugzilla – Bug 694129
Ignoring firmware updates is broken
Last modified: 2013-02-19 22:48:17 UTC
Created attachment 236673 [details] [review] Fix firmware update plugin I accidentally clicked Ignore on some popup that asked me to install some additional firmware. Following that, gnome-settings-daemon began crashing when I logged in. A backtrace can be found on Fedora's bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=912249 I have looked at the code, and found two issues stemming from a misuse of g_ptr_array_remove_index_fast. This function calls the `free_function` passed when the GPtrArray is created. But the code also calls the `free_function` thus causing a double-free. Additionally, g_ptr_array_remove_index_fast replaces the indexed element with the last element. What that means is that the current index must *still* be checked, but the for loop means it will be skipped. I have attached a patch that fixes the crash and the skipping of elements.
I fixed the fact that "ret" was not reset for each loop iteration, and pushed to gnome-3-6 and master, thanks.
Ah yes, I meant to do that and forgot about it. Thanks.