[Spice-commits] server/sound.c

Frediano Ziglio fziglio at kemper.freedesktop.org
Mon Nov 14 21:52:23 UTC 2016


 server/sound.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d1fac9e6467026ea19d8e7df3e2fdb355f3609ef
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Fri Nov 11 20:08:01 2016 +0000

    sound: Free worker volume in common function
    
    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>
    Acked-by: Jonathon Jongsma <jjongsma at redhat.com>

diff --git a/server/sound.c b/server/sound.c
index 624585e..ccdfc10 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-commits mailing list