[PATCH] mbimcli, dss: fix a potential memory leak in set_dss_ready

Aleksander Morgado aleksander at aleksander.es
Wed Jul 26 10:14:30 UTC 2017


On 26/07/17 09:10, Ben Chan wrote:
> ---
>  src/mbimcli/mbimcli-dss.c | 2 ++
>  1 file changed, 2 insertions(+)
> 

Pushed to git master, mbim-1-4 and mbim-1-2, thanks.

> diff --git a/src/mbimcli/mbimcli-dss.c b/src/mbimcli/mbimcli-dss.c
> index c7424e6..76866b9 100644
> --- a/src/mbimcli/mbimcli-dss.c
> +++ b/src/mbimcli/mbimcli-dss.c
> @@ -157,6 +157,8 @@ set_dss_ready (MbimDevice *device,
>      if (!response || !mbim_message_response_get_result (response, MBIM_MESSAGE_TYPE_COMMAND_DONE, &error)) {
>          g_printerr ("error: operation failed: %s\n", error->message);
>          g_error_free (error);
> +        if (response)
> +            mbim_message_unref (response);
>          shutdown (FALSE);
>          return;
>      }
> 


-- 
Aleksander
https://aleksander.es


More information about the libmbim-devel mailing list