mirror of https://github.com/mpv-player/mpv
vo_opengl: fix a small memory leak when loading user shaders
When gl_shader_cache was destroyed, existing user shader entries leaked the file path string.
This commit is contained in:
parent
4a90b15f74
commit
7de2411c47
|
@ -597,7 +597,7 @@ const char *gl_sc_loadfile(struct gl_shader_cache *sc, const char *path)
|
|||
if (s.len) {
|
||||
struct sc_file *new = &sc->files[sc->num_files++];
|
||||
*new = (struct sc_file) {
|
||||
.path = talloc_strdup(NULL, path),
|
||||
.path = talloc_strdup(sc, path),
|
||||
.body = s.start
|
||||
};
|
||||
return new->body;
|
||||
|
|
Loading…
Reference in New Issue