Feb. 2, 2023
4:08 a.m.
Rémi Bernon (@rbernon) commented about dlls/windows.media.speech/vosk.c:
+ { + path = malloc(strlen(env) + strlen(vosk) + 1); + sprintf(path, "%s%s", env, vosk); + + status = find_model_by_lang_and_path(path, lcid, model); + } + else if ((env = getenv("HOME"))) + { + path = malloc(strlen(env) + strlen(cache_vosk) + 1); + sprintf(path, "%s%s", env, cache_vosk); + + status = find_model_by_lang_and_path(path, lcid, model); + } + + if (path) + free(path); FWIW `free(NULL)` is fine.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/2091#note_22806