ucm: Set uc_mgr->ctl to NULL after closing it.
PATCH 1/1 ucm: Set uc_mgr->ctl to NULL after closing it.
Fixes a double-free bug.
Signed-off-by Tanu Kaskinen <[email protected]>
--- src/ucm/main.c | 1 + 1 file changed, 1 insertion(+)
src/ucm/main.c +1 -0
@@ -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 );
Signature · 1 line
1.7.10.4
Quoted 12 lines · Tanu Kaskinen
Fixes a double-free bug.
Signed-off-by Tanu Kaskinen <[email protected]>--- src/ucm/main.c | 1 + 1 file changed, 1 insertion(+)src/ucm/main.c +0
-0
src/ucm/main.c static int open_ctl(snd_use_case_mgr_t *uc_mgr, · line 151
Quoted 7 lines
src/ucm/main.c +1
-0@@ -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 <[email protected]>
Takashi Iwai
AppliedAt Mon, 28 Jan 2013 09:19:03 +0000,
Quoted 19 lines · Liam Girdwood
Quoted 17 lines · Tanu Kaskinen
Fixes a double-free bug.
Signed-off-by Tanu Kaskinen <[email protected]>--- src/ucm/main.c | 1 + 1 file changed, 1 insertion(+)src/ucm/main.c +1
-0@@ -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 ;
Quoted 4 lines
src/ucm/main.c static int open_ctl(snd_use_case_mgr_t *uc_mgr, · line 151
Quoted 2 lines
src/ucm/main.c +0
-0} err =snd_ctl_open (ctl, ctl_dev,0 );Acked-by Liam Girdwood <[email protected]>
Thanks, applied now.
Takashi