Hello community,

here is the log from the commit of package alsa-plugins for openSUSE:Factory 
checked in at 2018-11-06 14:05:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/alsa-plugins (Old)
 and      /work/SRC/openSUSE:Factory/.alsa-plugins.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "alsa-plugins"

Tue Nov  6 14:05:53 2018 rev:101 rq:644274 version:1.1.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/alsa-plugins/alsa-plugins.changes        
2018-10-23 20:35:18.528908573 +0200
+++ /work/SRC/openSUSE:Factory/.alsa-plugins.new/alsa-plugins.changes   
2018-11-06 14:06:47.731263928 +0100
@@ -1,0 +2,19 @@
+Wed Oct 24 14:07:24 CEST 2018 - [email protected]
+
+- Backport of yet another regression fixes in upstream:
+  0005-Revert-jack-Fix-leaks-when-jack_set_hw_constraint-fa.patch
+  0006-Revert-usb_stream-Fix-leaks-when-us_set_hw_constrain.patch
+  0007-Revert-oss-Fix-leaks-when-oss_hw_constraint-fails.patch
+
+-------------------------------------------------------------------
+Wed Oct 24 09:43:57 CEST 2018 - [email protected]
+
+- Backport upstream commits:
+  fix memory leaks and other minor issues in usb_stream plugin,
+  fix a regression (appearins in PulseAudio) with a52 plugin:
+  0001-pcm_usb_stream-fix-another-leak-in-snd_pcm_us_open.patch
+  0002-pcm_usb_stream-remove-unused-parameter-in-snd_pcm_us.patch
+  0003-pcm_usb_stream-fix-signess-issues.patch
+  0004-a52_close-set-slave-to-NULL-to-avoid-double-pcm-free.patch
+
+-------------------------------------------------------------------

New:
----
  0001-pcm_usb_stream-fix-another-leak-in-snd_pcm_us_open.patch
  0002-pcm_usb_stream-remove-unused-parameter-in-snd_pcm_us.patch
  0003-pcm_usb_stream-fix-signess-issues.patch
  0004-a52_close-set-slave-to-NULL-to-avoid-double-pcm-free.patch
  0005-Revert-jack-Fix-leaks-when-jack_set_hw_constraint-fa.patch
  0006-Revert-usb_stream-Fix-leaks-when-us_set_hw_constrain.patch
  0007-Revert-oss-Fix-leaks-when-oss_hw_constraint-fails.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ alsa-plugins.spec ++++++
--- /var/tmp/diff_new_pack.quJ3qN/_old  2018-11-06 14:06:48.355263110 +0100
+++ /var/tmp/diff_new_pack.quJ3qN/_new  2018-11-06 14:06:48.355263110 +0100
@@ -34,6 +34,13 @@
 Source1:        asound-pulse.conf
 Source2:        alsa-pulse.conf
 Source3:        baselibs.conf
+Patch1:         0001-pcm_usb_stream-fix-another-leak-in-snd_pcm_us_open.patch
+Patch2:         0002-pcm_usb_stream-remove-unused-parameter-in-snd_pcm_us.patch
+Patch3:         0003-pcm_usb_stream-fix-signess-issues.patch
+Patch4:         0004-a52_close-set-slave-to-NULL-to-avoid-double-pcm-free.patch
+Patch5:         0005-Revert-jack-Fix-leaks-when-jack_set_hw_constraint-fa.patch
+Patch6:         0006-Revert-usb_stream-Fix-leaks-when-us_set_hw_constrain.patch
+Patch7:         0007-Revert-oss-Fix-leaks-when-oss_hw_constraint-fails.patch
 BuildRequires:  alsa-devel
 BuildRequires:  dbus-1-devel
 %if %build_avcodec
@@ -144,6 +151,13 @@
 
 %prep
 %setup -q -n %{name}-%{package_version}
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
 
 %build
 export AUTOMAKE_JOBS="%{?_smp_mflags}"

++++++ 0001-pcm_usb_stream-fix-another-leak-in-snd_pcm_us_open.patch ++++++
>From 68c4cd3a471ed1f4a367830eb31881d3e5815813 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Tue, 23 Oct 2018 08:39:16 +0200
Subject: [PATCH 1/4] pcm_usb_stream: fix another leak in snd_pcm_us_open()

Signed-off-by: Jaroslav Kysela <[email protected]>
---
 usb_stream/pcm_usb_stream.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/usb_stream/pcm_usb_stream.c b/usb_stream/pcm_usb_stream.c
index eb4ca981c5f1..5ca1c0f0d04e 100644
--- a/usb_stream/pcm_usb_stream.c
+++ b/usb_stream/pcm_usb_stream.c
@@ -424,8 +424,10 @@ static int snd_pcm_us_open(snd_pcm_t **pcmp, const char 
*name,
        }
        VDBG("%i %s", stream, us_name);
        us->uus = get_uus(card);
-       if (!us->uus)
+       if (!us->uus) {
+               free(us);
                return -ENOMEM;
+       }
        err = snd_hwdep_open(&us->hwdep, us_name, O_RDWR);
        if (err < 0) {
                us_free(us);
-- 
2.19.1

++++++ 0002-pcm_usb_stream-remove-unused-parameter-in-snd_pcm_us.patch ++++++
>From 9ff42e4baf03a84eca83b8c25e0165572259d253 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Tue, 23 Oct 2018 08:47:16 +0200
Subject: [PATCH 2/4] pcm_usb_stream: remove unused parameter in
 snd_pcm_us_read()

Signed-off-by: Jaroslav Kysela <[email protected]>
---
 usb_stream/pcm_usb_stream.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/usb_stream/pcm_usb_stream.c b/usb_stream/pcm_usb_stream.c
index 5ca1c0f0d04e..6d08c37e2d2d 100644
--- a/usb_stream/pcm_usb_stream.c
+++ b/usb_stream/pcm_usb_stream.c
@@ -297,7 +297,7 @@ static snd_pcm_sframes_t snd_pcm_us_write(snd_pcm_ioplug_t 
*io,
        return size;
 }
 
-static int usb_stream_read(struct user_usb_stream *uus, void *to, unsigned 
bytes)
+static int usb_stream_read(struct user_usb_stream *uus, void *to)
 {
        struct usb_stream *s = uus->s;
        int p = s->inpacket_split, l = 0;
@@ -337,8 +337,7 @@ static snd_pcm_sframes_t snd_pcm_us_read(snd_pcm_ioplug_t 
*io,
                        return -EINVAL;
                }
                if (us->uus->s->periods_done - us->periods_done == 1) {
-                       red = usb_stream_read(us->uus, to, size * frame_size) /
-                               frame_size;
+                       red = usb_stream_read(us->uus, to) / frame_size;
                        us->periods_done++;
                        return red;
                }
-- 
2.19.1

++++++ 0003-pcm_usb_stream-fix-signess-issues.patch ++++++
>From cbe7907f46ce9dcd73be392f6660c76767ce3c99 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Tue, 23 Oct 2018 08:49:23 +0200
Subject: [PATCH 3/4] pcm_usb_stream: fix signess issues

Signed-off-by: Jaroslav Kysela <[email protected]>
---
 usb_stream/pcm_usb_stream.c | 4 ++--
 usb_stream/usb_stream.h     | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/usb_stream/pcm_usb_stream.c b/usb_stream/pcm_usb_stream.c
index 6d08c37e2d2d..3f74abad5471 100644
--- a/usb_stream/pcm_usb_stream.c
+++ b/usb_stream/pcm_usb_stream.c
@@ -300,9 +300,9 @@ static snd_pcm_sframes_t snd_pcm_us_write(snd_pcm_ioplug_t 
*io,
 static int usb_stream_read(struct user_usb_stream *uus, void *to)
 {
        struct usb_stream *s = uus->s;
-       int p = s->inpacket_split, l = 0;
+       unsigned p = s->inpacket_split, l = 0;
        void *i = (void *)s + s->inpacket[p].offset + s->inpacket_split_at;
-       int il = s->inpacket[p].length - s->inpacket_split_at;
+       unsigned il = s->inpacket[p].length - s->inpacket_split_at;
 
        do {
                if (l + il > s->period_size)
diff --git a/usb_stream/usb_stream.h b/usb_stream/usb_stream.h
index 4dd74ab1e9cc..96f8d9e94463 100644
--- a/usb_stream/usb_stream.h
+++ b/usb_stream/usb_stream.h
@@ -39,7 +39,7 @@ struct usb_stream {
        unsigned read_size;
        unsigned write_size;
 
-       int period_size;
+       unsigned period_size;
 
        unsigned state;
 
-- 
2.19.1

++++++ 0004-a52_close-set-slave-to-NULL-to-avoid-double-pcm-free.patch ++++++
>From a4e7e1282c57a2f4e83afe9a4008042d8b4c5bb9 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Tue, 23 Oct 2018 09:32:46 +0200
Subject: [PATCH 4/4] a52_close: set slave to NULL to avoid double pcm free in
 open fcn

Signed-off-by: Jaroslav Kysela <[email protected]>
---
 a52/pcm_a52.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/a52/pcm_a52.c b/a52/pcm_a52.c
index e431fd07e06c..b005bc2040c0 100644
--- a/a52/pcm_a52.c
+++ b/a52/pcm_a52.c
@@ -654,10 +654,13 @@ static int a52_poll_revents(snd_pcm_ioplug_t *io, struct 
pollfd *pfd,
 static int a52_close(snd_pcm_ioplug_t *io)
 {
        struct a52_ctx *rec = io->private_data;
+       snd_pcm_t *slave = rec->slave;
 
        a52_free(rec);
-       if (rec->slave)
-               return snd_pcm_close(rec->slave);
+       if (slave) {
+               rec->slave = NULL;
+               return snd_pcm_close(slave);
+       }
        return 0;
 }
                              
-- 
2.19.1

++++++ 0005-Revert-jack-Fix-leaks-when-jack_set_hw_constraint-fa.patch ++++++
>From a244a37076cec8c7a65b844e334518c393fbdc5b Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Wed, 24 Oct 2018 12:18:42 +0200
Subject: [PATCH 5/7] Revert "jack: Fix leaks when jack_set_hw_constraint()
 fails"

This reverts commit f4746667a4a2490f17c2a82b6f421bc3c9bd6de8.

snd_pcm_ioplug_delete() already calls snd_pcm_close()!

Signed-off-by: Jaroslav Kysela <[email protected]>
---
 jack/pcm_jack.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/jack/pcm_jack.c b/jack/pcm_jack.c
index 6aaecac8361f..b39835e7c523 100644
--- a/jack/pcm_jack.c
+++ b/jack/pcm_jack.c
@@ -538,7 +538,6 @@ static int snd_pcm_jack_open(snd_pcm_t **pcmp, const char 
*name,
        err = jack_set_hw_constraint(jack);
        if (err < 0) {
                snd_pcm_ioplug_delete(&jack->io);
-               snd_pcm_jack_free(jack);
                return err;
        }
 
-- 
2.19.1

++++++ 0006-Revert-usb_stream-Fix-leaks-when-us_set_hw_constrain.patch ++++++
>From 434c83d5c422dd4367711e08b3538e366fcc469e Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Wed, 24 Oct 2018 12:23:11 +0200
Subject: [PATCH 6/7] Revert "usb_stream: Fix leaks when us_set_hw_constraint()
 fails"

This reverts commit 6b996865126dd559ef186002e45dc6e1594291e7.

snd_pcm_ioplug_delete() already calls snd_pcm_close()!

Signed-off-by: Jaroslav Kysela <[email protected]>
---
 usb_stream/pcm_usb_stream.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/usb_stream/pcm_usb_stream.c b/usb_stream/pcm_usb_stream.c
index 3f74abad5471..2a93d1f6cae2 100644
--- a/usb_stream/pcm_usb_stream.c
+++ b/usb_stream/pcm_usb_stream.c
@@ -456,7 +456,6 @@ static int snd_pcm_us_open(snd_pcm_t **pcmp, const char 
*name,
        err = us_set_hw_constraint(us);
        if (err < 0) {
                snd_pcm_ioplug_delete(&us->io);
-               us_free(us);
                return err;
        }
 
-- 
2.19.1

++++++ 0007-Revert-oss-Fix-leaks-when-oss_hw_constraint-fails.patch ++++++
>From 7dfd3c4fe073319f21192c89a44c16f8b68af3ad Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <[email protected]>
Date: Wed, 24 Oct 2018 12:27:16 +0200
Subject: [PATCH 7/7] Revert "oss: Fix leaks when oss_hw_constraint() fails"

This reverts commit b8bcd458b79146547fc6dae1645832695545da44.

snd_pcm_ioplug_delete() already calls snd_pcm_close()!
---
 oss/pcm_oss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/oss/pcm_oss.c b/oss/pcm_oss.c
index 8ab4fb01d37b..dadbb5bc8032 100644
--- a/oss/pcm_oss.c
+++ b/oss/pcm_oss.c
@@ -413,7 +413,7 @@ SND_PCM_PLUGIN_DEFINE_FUNC(oss)
 
        if ((err = oss_hw_constraint(oss)) < 0) {
                snd_pcm_ioplug_delete(&oss->io);
-               goto error;
+               return err;
        }
 
        *pcmp = oss->io.pcm;
-- 
2.19.1


Reply via email to