diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2014-04-30 15:57:30 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2014-05-05 20:47:55 +0200 |
commit | 828e2e00eb8e4ced54ec51fb61bfdb37df526935 (patch) | |
tree | ec387147df5e097309982cf71ec1743f3193d4ba /libmm-glib | |
parent | 0126eb63114ddd5099a4f63dac67e190ccd00706 (diff) | |
download | ModemManager-828e2e00eb8e4ced54ec51fb61bfdb37df526935.tar.gz |
libmm-glib: Initialize result array
In mm_modem_messaging_get_supported_storages(), initialize array to avoid a
potential crash with an uninitialized value, and a build failure due to
mm-modem-messaging.c:168:24: error: 'array' may be used uninitialized in this
function [-Werror=maybe-uninitialized]
*n_storages = array->len;
https://bugzilla.gnome.org/show_bug.cgi?id=729267
Diffstat (limited to 'libmm-glib')
-rw-r--r-- | libmm-glib/mm-modem-messaging.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libmm-glib/mm-modem-messaging.c b/libmm-glib/mm-modem-messaging.c index fdf14978d..c61919496 100644 --- a/libmm-glib/mm-modem-messaging.c +++ b/libmm-glib/mm-modem-messaging.c @@ -155,7 +155,7 @@ mm_modem_messaging_get_supported_storages (MMModemMessaging *self, MMSmsStorage **storages, guint *n_storages) { - GArray *array; + GArray *array = NULL; g_return_val_if_fail (MM_IS_MODEM_MESSAGING (self), FALSE); g_return_val_if_fail (storages != NULL, FALSE); |