alsa/0045-ucm-Set-uc_mgr-ctl-to-NULL-after-closing-it.patch
Takashi Iwai cd5dd1370c Accepting request 150679 from home:tiwai:branches:multimedia:libs
- Backport a few fix patches from upstream, mostly for fixing
  crashes in multi-thread programs:
  0044-configure-do-not-detect-incorrect-cross-compiler.patch
  0045-ucm-Set-uc_mgr-ctl-to-NULL-after-closing-it.patch
  0046-snd_pcm_direct_parse_open_conf-use-thread-safe-getgr.patch
  0047-Add-snd_lib_error_set_local-to-install-a-thread-loca.patch
  0048-snd_device_name_hint-do-not-change-the-global-error-.patch
  0049-snd_device_name_hint-do-not-use-global-snd_config.patch
  0050-conf-Fix-a-memory-access-violation-resulting-from-im.patch

OBS-URL: https://build.opensuse.org/request/show/150679
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=123
2013-02-01 10:22:50 +00:00

25 lines
705 B
Diff

From 1629e2fbf3dc211eceb37f980e11e5babe1cefe4 Mon Sep 17 00:00:00 2001
From: Tanu Kaskinen <tanuk@iki.fi>
Date: Sat, 26 Jan 2013 14:20:20 +0200
Subject: [PATCH 45/50] ucm: Set uc_mgr->ctl to NULL after closing it.
Fixes a double-free bug.
Signed-off-by: Tanu Kaskinen <tanuk@iki.fi>
Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
src/ucm/main.c | 1 +
1 file changed, 1 insertion(+)
--- a/src/ucm/main.c
+++ b/src/ucm/main.c
@@ -145,6 +145,7 @@ static int open_ctl(snd_use_case_mgr_t *
free(uc_mgr->ctl_dev);
uc_mgr->ctl_dev = NULL;
snd_ctl_close(uc_mgr->ctl);
+ uc_mgr->ctl = NULL;
}
err = snd_ctl_open(ctl, ctl_dev, 0);