Re: [PATCH spice-server v2 4/4] sound: Free worker volume in common function

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

 



Acked-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx>


On Mon, 2016-11-14 at 09:32 +0000, Frediano Ziglio wrote:
> The common function is supposed to clear the state of SndWorker
> so clear even volume which now is in SndWorker
> 
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> ---
>  server/sound.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/server/sound.c b/server/sound.c
> index 915756f..937eafb 100644
> --- a/server/sound.c
> +++ b/server/sound.c
> @@ -1582,11 +1582,12 @@ static void snd_detach_common(SndWorker
> *worker)
>      snd_disconnect_channel(worker->connection);
>      reds_unregister_channel(reds, worker->base_channel);
>      red_channel_destroy(worker->base_channel);
> +    free(worker->volume.volume);
> +    worker->volume.volume = NULL;
>  }
>  
>  static void spice_playback_state_free(SpicePlaybackState *st)
>  {
> -    free(st->worker.volume.volume);
>      free(st);
>  }
>  
> @@ -1598,7 +1599,6 @@ void snd_detach_playback(SpicePlaybackInstance
> *sin)
>  
>  static void spice_record_state_free(SpiceRecordState *st)
>  {
> -    free(st->worker.volume.volume);
>      free(st);
>  }
>  
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]