diff options
author | Vlad Orlov <monsta@inbox.ru> | 2015-03-13 13:17:31 +0100 |
---|---|---|
committer | Martin Pitt <martin.pitt@ubuntu.com> | 2015-03-13 13:17:31 +0100 |
commit | 2510148b16a71504dff3880c8af416fd85a2885d (patch) | |
tree | 5089ee007b8b45d5b4713a0c5b4ffb8baf123c27 /libupower-glib | |
parent | f3706d7a2978ae0fae513fd09469dbfcf5c28a09 (diff) | |
download | upower-2510148b16a71504dff3880c8af416fd85a2885d.tar.gz |
lib: Fix crash on uninitialized variant
Initialize the GVariant* pointers, so that they aren't uninitialized when
jumping to "out:" and unref'ing them.
https://bugs.freedesktop.org/show_bug.cgi?id=89476
https://bugs.debian.org/774546
https://bugs.launchpad.net/ubuntu-mate/+bug/1428337
Diffstat (limited to 'libupower-glib')
-rw-r--r-- | libupower-glib/up-device.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libupower-glib/up-device.c b/libupower-glib/up-device.c index 9f6e0e1..f053f3d 100644 --- a/libupower-glib/up-device.c +++ b/libupower-glib/up-device.c @@ -422,7 +422,7 @@ GPtrArray * up_device_get_history_sync (UpDevice *device, const gchar *type, guint timespec, guint resolution, GCancellable *cancellable, GError **error) { GError *error_local = NULL; - GVariant *gva; + GVariant *gva = NULL; guint i; GPtrArray *array = NULL; gboolean ret; @@ -502,7 +502,7 @@ GPtrArray * up_device_get_statistics_sync (UpDevice *device, const gchar *type, GCancellable *cancellable, GError **error) { GError *error_local = NULL; - GVariant *gva; + GVariant *gva = NULL; guint i; GPtrArray *array = NULL; gboolean ret; |