Commit 2510148b authored by Vlad Orlov's avatar Vlad Orlov Committed by Martin Pitt

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
parent f3706d7a
...@@ -422,7 +422,7 @@ GPtrArray * ...@@ -422,7 +422,7 @@ GPtrArray *
up_device_get_history_sync (UpDevice *device, const gchar *type, guint timespec, guint resolution, GCancellable *cancellable, GError **error) up_device_get_history_sync (UpDevice *device, const gchar *type, guint timespec, guint resolution, GCancellable *cancellable, GError **error)
{ {
GError *error_local = NULL; GError *error_local = NULL;
GVariant *gva; GVariant *gva = NULL;
guint i; guint i;
GPtrArray *array = NULL; GPtrArray *array = NULL;
gboolean ret; gboolean ret;
...@@ -502,7 +502,7 @@ GPtrArray * ...@@ -502,7 +502,7 @@ GPtrArray *
up_device_get_statistics_sync (UpDevice *device, const gchar *type, GCancellable *cancellable, GError **error) up_device_get_statistics_sync (UpDevice *device, const gchar *type, GCancellable *cancellable, GError **error)
{ {
GError *error_local = NULL; GError *error_local = NULL;
GVariant *gva; GVariant *gva = NULL;
guint i; guint i;
GPtrArray *array = NULL; GPtrArray *array = NULL;
gboolean ret; gboolean ret;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment