diff options
author | Bastien Nocera <hadess@hadess.net> | 2018-06-13 14:21:56 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2018-06-13 14:25:09 +0200 |
commit | 84c2e9816c913825f650a7641ef4b3ce617970fc (patch) | |
tree | 9a0ddec4b9e575ce11088506107d831f4522d1c6 | |
parent | bbc31e662146370dd4c96727381b22beb58e3782 (diff) | |
download | libgweather-wip/hadess/gnome-shell-crasher.tar.gz |
GWeatherLocation: Fix refcount of deserialized named timezoneswip/hadess/gnome-shell-crasher
When deserialising named timezones, make sure to hand out a reference to
the GWeatherLocation, as all the callers (and the public API) expect a
reference to be handed out.
This fixes a crash in gnome-shell when garbage collection is triggered
and the returned location is unreferenced.
See https://bugzilla.redhat.com/show_bug.cgi?id=1577561
-rw-r--r-- | libgweather/gweather-location.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libgweather/gweather-location.c b/libgweather/gweather-location.c index a5bd121..5e37f2f 100644 --- a/libgweather/gweather-location.c +++ b/libgweather/gweather-location.c @@ -1458,7 +1458,7 @@ gweather_location_common_deserialize (GWeatherLocation *world, * return it directly */ if (station_code[0] == '@') - return candidates->data; + return gweather_location_ref (candidates->data); /* If we don't have coordinates, fallback immediately to making up * a location |