OSDN Git Service

ucm: fix bad frees in get_list0 and get_list20
authorAlex Henrie <alexhenrie24@gmail.com>
Sat, 26 Dec 2020 21:35:40 +0000 (14:35 -0700)
committerTakashi Iwai <tiwai@suse.de>
Sun, 27 Dec 2020 08:21:55 +0000 (09:21 +0100)
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/ucm/main.c

index 3871d5a..754b967 100644 (file)
@@ -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;
 }