diff options
author | wm4 <wm4@nowhere> | 2015-06-09 22:42:03 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-06-09 22:42:03 +0200 |
commit | 7de2411c4778d177fbab58afdd7a04e8012c7d2b (patch) | |
tree | 60d0cfa94891a3d5c0d1b96681ede3759f76d293 /video | |
parent | 4a90b15f74281dce6d0502b4005cbff3c4e7cff3 (diff) | |
download | mpv-7de2411c4778d177fbab58afdd7a04e8012c7d2b.tar.bz2 mpv-7de2411c4778d177fbab58afdd7a04e8012c7d2b.tar.xz |
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.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/gl_utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/gl_utils.c b/video/out/gl_utils.c index 0401a0830e..d49ec7f6eb 100644 --- a/video/out/gl_utils.c +++ b/video/out/gl_utils.c @@ -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; |