diff mbox series

[2/9] ucm: fix bad frees in get_list0 and get_list20

Message ID 20201226213547.175071-3-alexhenrie24@gmail.com (mailing list archive)
State New, archived
Headers show
Series scan-build fixes | expand

Commit Message

Alex Henrie Dec. 26, 2020, 9:35 p.m. UTC
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
---
 src/ucm/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Takashi Iwai Dec. 27, 2020, 8:38 a.m. UTC | #1
On Sat, 26 Dec 2020 22:35:40 +0100,
Alex Henrie wrote:
> 
> Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>

Applied, thanks.


Takashi
diff mbox series

Patch

diff --git a/src/ucm/main.c b/src/ucm/main.c
index 3871d5aa..754b967e 100644
--- a/src/ucm/main.c
+++ b/src/ucm/main.c
@@ -666,7 +666,7 @@  static int get_list0(struct list_head *list,
 	}
 	return cnt;
       __fail:
-        snd_use_case_free_list((const char **)res, cnt);
+        snd_use_case_free_list(*result, cnt);
         return -ENOMEM;
 }
 
@@ -724,7 +724,7 @@  static int get_list20(struct list_head *list,
 	}
 	return cnt;
       __fail:
-        snd_use_case_free_list((const char **)res, cnt);
+        snd_use_case_free_list(*result, cnt);
         return -ENOMEM;
 }