Re: [evolution-patches] Please review my patch for bug #47131



This logic needs cleaning, and leads to a memory leak in the non-file
url case:

> +
> +                               if (!strcasecmp (url->protocol,
> "file")) {
> +                                       filename = url->path;
> +
> +                                       e_msg_composer_attachment_bar_attach
> +                                               (E_MSG_COMPOSER_ATTACHMENT_BAR (composer->attachment_bar),
> +                                               filename);
> +
> +                                       g_free (filename);
> +                               }
>                                 url->path = NULL;
>                                 camel_url_free (url);
> -                               

remove the url->path = NULL, and the filename variable entirely, and
just use url->path in :bar_attach().






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]