Fix crasher in newly enabled audio device selection dialogue
This commit is contained in:
parent
4ec1d751a0
commit
124fbdd89d
@ -0,0 +1,54 @@
|
|||||||
|
From 25bf3ed75fa604fa73e8b25241119a993fc659d6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Bastien Nocera <hadess@hadess.net>
|
||||||
|
Date: Sun, 17 Apr 2016 22:27:47 +0200
|
||||||
|
Subject: [PATCH] gvc-mixer-control: Really fix double-free when setting
|
||||||
|
headset
|
||||||
|
|
||||||
|
In a28e23d9006a32c8982ad8bda11fec131c6b36e8, we said:
|
||||||
|
The callbacks will be called repeatedly, once with data, and later
|
||||||
|
on with eol == 0. Make sure to only free it when we get the eol call
|
||||||
|
instead of once we've applied the settings.
|
||||||
|
|
||||||
|
Whereas the docs say:
|
||||||
|
When requesting all of these [instances] at once, the callback will be
|
||||||
|
called multiple times, once for each object. When the list has been
|
||||||
|
exhausted, the callback will be called without an information structure
|
||||||
|
and the eol parameter set to a positive value.
|
||||||
|
|
||||||
|
If an error occurs, the callback will be invoked without an information
|
||||||
|
structure and eol set to a negative value.
|
||||||
|
|
||||||
|
So, in all, we need to free our callback data when eol is positive, or
|
||||||
|
negative. So, when it's not 0.
|
||||||
|
|
||||||
|
Seems we got lucky in the original commit because the test machine only
|
||||||
|
had a single soundcard.
|
||||||
|
---
|
||||||
|
gvc-mixer-control.c | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/gvc-mixer-control.c b/gvc-mixer-control.c
|
||||||
|
index 5fb1f31..760b05d 100644
|
||||||
|
--- a/gvc-mixer-control.c
|
||||||
|
+++ b/gvc-mixer-control.c
|
||||||
|
@@ -2099,7 +2099,7 @@ sink_info_cb (pa_context *c,
|
||||||
|
int j;
|
||||||
|
const char *s;
|
||||||
|
|
||||||
|
- if (eol <= 0) {
|
||||||
|
+ if (eol != 0) {
|
||||||
|
port_status_data_free (data);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
@@ -2135,7 +2135,7 @@ source_info_cb (pa_context *c,
|
||||||
|
int j;
|
||||||
|
const char *s;
|
||||||
|
|
||||||
|
- if (eol <= 0) {
|
||||||
|
+ if (eol != 0) {
|
||||||
|
port_status_data_free (data);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.7.3
|
||||||
|
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
Name: gnome-settings-daemon
|
Name: gnome-settings-daemon
|
||||||
Version: 3.20.1
|
Version: 3.20.1
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: The daemon sharing settings from GNOME to GTK+/KDE applications
|
Summary: The daemon sharing settings from GNOME to GTK+/KDE applications
|
||||||
|
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
@ -17,6 +17,7 @@ URL: http://download.gnome.org/sources/%{name}
|
|||||||
Source: http://download.gnome.org/sources/%{name}/3.20/%{name}-%{version}.tar.xz
|
Source: http://download.gnome.org/sources/%{name}/3.20/%{name}-%{version}.tar.xz
|
||||||
# disable wacom for ppc/ppc64 (used on RHEL)
|
# disable wacom for ppc/ppc64 (used on RHEL)
|
||||||
Patch0: %{name}-3.5.4-ppc-no-wacom.patch
|
Patch0: %{name}-3.5.4-ppc-no-wacom.patch
|
||||||
|
Patch1: 0001-gvc-mixer-control-Really-fix-double-free-when-settin.patch
|
||||||
|
|
||||||
BuildRequires: pkgconfig(colord) >= 1.0.2
|
BuildRequires: pkgconfig(colord) >= 1.0.2
|
||||||
BuildRequires: pkgconfig(fontconfig)
|
BuildRequires: pkgconfig(fontconfig)
|
||||||
@ -90,6 +91,9 @@ developing applications that use %{name}.
|
|||||||
%patch0 -p1 -b .ppc-no-wacom
|
%patch0 -p1 -b .ppc-no-wacom
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
pushd plugins/media-keys/gvc
|
||||||
|
%patch1 -p1 -b .crasher
|
||||||
|
popd
|
||||||
autoreconf -i -f
|
autoreconf -i -f
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -255,6 +259,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
|
|||||||
%{_libexecdir}/gsd-test-xsettings
|
%{_libexecdir}/gsd-test-xsettings
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Apr 17 2016 Bastien Nocera <bnocera@redhat.com> - 3.20.1-3
|
||||||
|
- Fix crasher in newly enabled audio device selection dialogue
|
||||||
|
|
||||||
* Sun Apr 17 2016 Bastien Nocera <bnocera@redhat.com> - 3.20.1-2
|
* Sun Apr 17 2016 Bastien Nocera <bnocera@redhat.com> - 3.20.1-2
|
||||||
- Require alsa to enable the audio device selection dialogue
|
- Require alsa to enable the audio device selection dialogue
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user