From ac2cbd71af94fe30d3e18f241f68bc4e1cc38d27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grisez?= Date: Mon, 2 Feb 2015 12:23:38 +0100 Subject: [PATCH] Fix bug #2051 Fix invalid reads due to an unstopped audiostream --- gtk/audio_assistant.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gtk/audio_assistant.c b/gtk/audio_assistant.c index ad5d95ea4..815752a2d 100644 --- a/gtk/audio_assistant.c +++ b/gtk/audio_assistant.c @@ -466,10 +466,17 @@ static void prepare(GtkAssistant *w){ } void linphone_gtk_close_audio_assistant(GtkWidget *w){ - gchar *path = g_object_get_data(G_OBJECT(audio_assistant),"path"); + gchar *path; + AudioStream *stream; + + path = g_object_get_data(G_OBJECT(audio_assistant),"path"); if(path != NULL){ g_unlink(path); } + stream = (AudioStream *)g_object_get_data(G_OBJECT(audio_assistant), "stream"); + if(stream) { + audio_stream_stop(stream); + } gtk_widget_destroy(w); if(linphone_gtk_get_audio_assistant_option()){ gtk_main_quit();