Re: [Rhythmbox-devel] Patch for DAAP Plugin



On Mon, 2011-05-02 at 16:58 -0400, Stephen Huenneke wrote:
> 
> diff --git a/plugins/daap/rb-daap-plugin.c
> b/plugins/daap/rb-daap-plugin.c
> index 20cc539..fc72ac0 100644
> --- a/plugins/daap/rb-daap-plugin.c
> +++ b/plugins/daap/rb-daap-plugin.c
> @@ -646,6 +646,7 @@ new_daap_share_location_added_cb (RBURIDialog
> *dialog,
>         host = g_strdup (location);
>         p = strrchr (host, ':');
>         if (p != NULL) {
> +               host = g_strndup (location, p);


That should probably be "p - location", instead of "p", and you're
leaking the host as well.

>                 port = strtoul (p+1, NULL, 10);
>                 *p = '\0';
>         }
> 
> 



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