mirror of https://github.com/mpv-player/mpv
options/m_option: free all list elements when removing them
Elements are not parented to the add list, as they are directly copied
to the target list. Therefore, we need to clean them up manually.
Fixes: 1f5a67d8fa
This commit is contained in:
parent
2054d872d4
commit
207aa647a5
|
@ -1319,6 +1319,8 @@ static int str_list_add(char **add, int n, void *dst, int pre)
|
|||
|
||||
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
|
||||
if (ln >= 100) {
|
||||
while (n--)
|
||||
talloc_free(add[n]);
|
||||
talloc_free(add);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue