[alsa-devel] [PATCH] ucm: Set uc_mgr->ctl to NULL after closing it.
Fixes a double-free bug.
Signed-off-by: Tanu Kaskinen tanuk@iki.fi --- src/ucm/main.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/src/ucm/main.c b/src/ucm/main.c index 0d7d841..d8b8ada 100644 --- a/src/ucm/main.c +++ b/src/ucm/main.c @@ -145,6 +145,7 @@ static int open_ctl(snd_use_case_mgr_t *uc_mgr, 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);
On Sat, 2013-01-26 at 14:20 +0200, Tanu Kaskinen wrote:
Fixes a double-free bug.
Signed-off-by: Tanu Kaskinen tanuk@iki.fi
src/ucm/main.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/src/ucm/main.c b/src/ucm/main.c index 0d7d841..d8b8ada 100644 --- a/src/ucm/main.c +++ b/src/ucm/main.c @@ -145,6 +145,7 @@ static int open_ctl(snd_use_case_mgr_t *uc_mgr, 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);
Acked-by: Liam Girdwood liam.r.girdwood@linux.intel.com
At Mon, 28 Jan 2013 09:19:03 +0000, Liam Girdwood wrote:
On Sat, 2013-01-26 at 14:20 +0200, Tanu Kaskinen wrote:
Fixes a double-free bug.
Signed-off-by: Tanu Kaskinen tanuk@iki.fi
src/ucm/main.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/src/ucm/main.c b/src/ucm/main.c index 0d7d841..d8b8ada 100644 --- a/src/ucm/main.c +++ b/src/ucm/main.c @@ -145,6 +145,7 @@ static int open_ctl(snd_use_case_mgr_t *uc_mgr, 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);
Acked-by: Liam Girdwood liam.r.girdwood@linux.intel.com
Thanks, applied now.
Takashi
participants (3)
-
Liam Girdwood
-
Takashi Iwai
-
Tanu Kaskinen