[PATCH] ublox: fix uninitialized variable issue

Aleksander Morgado aleksander at aleksander.es
Tue Jan 24 10:09:06 UTC 2017


On 24/01/17 08:08, Ben Chan wrote:
> This patch fixes an uninitialized variable issue in
> mm_ublox_parse_ugcntrd_response_for_cid(), which uses an uninitialized
> `match_info' when `in_cid' is invalid.

Pushed to git master, thanks!

> ---
>  plugins/ublox/mm-modem-helpers-ublox.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/plugins/ublox/mm-modem-helpers-ublox.c b/plugins/ublox/mm-modem-helpers-ublox.c
> index eaaed550..96ac4702 100644
> --- a/plugins/ublox/mm-modem-helpers-ublox.c
> +++ b/plugins/ublox/mm-modem-helpers-ublox.c
> @@ -970,7 +970,7 @@ mm_ublox_parse_ugcntrd_response_for_cid (const gchar  *response,
>                                           GError      **error)
>  {
>      GRegex     *r;
> -    GMatchInfo *match_info;
> +    GMatchInfo *match_info = NULL;
>      GError     *inner_error = NULL;
>      guint       session_tx_bytes = 0;
>      guint       session_rx_bytes = 0;
> 


-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list