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 781828 - location: Don't release libxml-allocated memory with g_free()
location: Don't release libxml-allocated memory with g_free()
Status: RESOLVED FIXED
Product: libgweather
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: future
Assigned To: libgweather-maint
libgweather-maint
: 782460 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-04-27 11:39 UTC by Florian Müllner
Modified: 2017-06-28 17:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
location: Don't release libxml-allocated memory with g_free() (1.47 KB, patch)
2017-04-27 11:39 UTC, Florian Müllner
committed Details | Review

Description Florian Müllner 2017-04-27 11:39:06 UTC
See patch.
Comment 1 Florian Müllner 2017-04-27 11:39:12 UTC
Created attachment 350543 [details] [review]
location: Don't release libxml-allocated memory with g_free()

Don't assume that xmlFree() and g_free() are interchangeable, copy
the value returned from XML like we already do for other struct
members.
Comment 2 Adam Williamson 2017-05-01 17:32:39 UTC
Downstream (Fedora) reporters are reporting running into another crash, with the Fedora build that's supposed to fix this bug and http://bugzilla.gnome.org/show_bug.cgi?id=780278 :

https://bugzilla.redhat.com/show_bug.cgi?id=1446879

There is a traceback in that report:

https://bugzilla.redhat.com/attachment.cgi?id=1275243
Comment 3 Florian Müllner 2017-05-10 17:00:08 UTC
*** Bug 782460 has been marked as a duplicate of this bug. ***
Comment 4 Giovanni Campagna 2017-06-05 04:46:04 UTC
Ah, I had missed this one from 3.24.1.

I believe there is no functional change (until libxml or glib change memory allocator)
but the patch makes sense so I applied it.

Attachment 350543 [details] pushed as 9b08eea - location: Don't release libxml-allocated memory with g_free()
Comment 5 Olav Vitters 2017-06-27 09:10:20 UTC
Seeing it has been a while, it fixes a crasher and no new releases planned: Maybe do another libgweather release? This to ensure all distributions get the gnome-shell crash fix.
Comment 6 Giovanni Campagna 2017-06-28 17:57:42 UTC
This actually fixes nothing, because xmlFree and g_free are interchangable (they both just call free()), unless some unusual build flags are applied.

The crashers that were seen around the time of this bug were unrelated and fixed in 3.24.1
Nevertheless, if you want I can make a 3.24.2. It would have only this patch though, not even translation updates are queued.