[Spice-devel] [PATCH spice-server v2 4/4] sound: Free worker volume in common function
Jonathon Jongsma
jjongsma at redhat.com
Mon Nov 14 21:02:41 UTC 2016
Acked-by: Jonathon Jongsma <jjongsma at redhat.com>
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 at redhat.com>
> ---
> 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);
> }
>
More information about the Spice-devel
mailing list