diff options
author | Dudemanguy <random342@airmail.cc> | 2023-07-04 15:10:29 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-07-04 22:14:43 +0000 |
commit | d6a690109022210b1196487e1509b940380bee6b (patch) | |
tree | 57dd8daa2a3807b9c45df5d0a7c76ff8bc96e2de /video | |
parent | dbc0fcea1bcd3b5ea0319f74a6310f2691c1d371 (diff) | |
download | mpv-d6a690109022210b1196487e1509b940380bee6b.tar.bz2 mpv-d6a690109022210b1196487e1509b940380bee6b.tar.xz |
vo_gpu: fix some cache related memory leaks
I goofed this up.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/gpu/lcms.c | 4 | ||||
-rw-r--r-- | video/out/gpu/shader_cache.c | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/video/out/gpu/lcms.c b/video/out/gpu/lcms.c index 52345c4b9c..0ff4de8344 100644 --- a/video/out/gpu/lcms.c +++ b/video/out/gpu/lcms.c @@ -354,9 +354,9 @@ bool gl_lcms_get_lut3d(struct gl_lcms *p, struct lut3d **result_lut3d, char *cache_dir = p->opts->cache_dir; if (cache_dir && cache_dir[0]) { - cache_dir = mp_get_user_path(NULL, p->global, cache_dir); + cache_dir = mp_get_user_path(tmp, p->global, cache_dir); } else { - cache_dir = mp_find_user_file(NULL, p->global, "cache", ""); + cache_dir = mp_find_user_file(tmp, p->global, "cache", ""); } cache_file = talloc_strdup(tmp, ""); diff --git a/video/out/gpu/shader_cache.c b/video/out/gpu/shader_cache.c index a046831f80..3e051730fd 100644 --- a/video/out/gpu/shader_cache.c +++ b/video/out/gpu/shader_cache.c @@ -566,6 +566,7 @@ void gl_sc_set_cache_dir(struct gl_shader_cache *sc, char *dir) dir = mp_find_user_file(NULL, sc->global, "cache", ""); } sc->cache_dir = talloc_strdup(sc, dir); + talloc_free(dir); } static bool create_pass(struct gl_shader_cache *sc, struct sc_entry *entry) |