[PATCH] qmi-firmware-update: remove unnecessary NULL checks for g_match_info_free

Aleksander Morgado aleksander at aleksander.es
Thu Oct 18 11:16:50 UTC 2018


On 10/18/18 8:11 AM, Ben Chan wrote:
> g_match_info_free() already check if the given pointer is NULL and does
> nothing on a NULL pointer.
> ---

Pushed to git master, thanks

>  src/qmi-firmware-update/qfu-utils.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/src/qmi-firmware-update/qfu-utils.c b/src/qmi-firmware-update/qfu-utils.c
> index 035e78f..7a74f91 100644
> --- a/src/qmi-firmware-update/qfu-utils.c
> +++ b/src/qmi-firmware-update/qfu-utils.c
> @@ -207,8 +207,7 @@ qfu_utils_parse_cwe_version_string (const gchar  *version,
>      result = TRUE;
>  
>  out:
> -    if (match_info)
> -        g_match_info_free (match_info);
> +    g_match_info_free (match_info);
>      g_regex_unref (regex);
>  
>      return result;
> 


-- 
Aleksander
https://aleksander.es


More information about the libqmi-devel mailing list