summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-06-09 22:42:03 +0200
committerwm4 <wm4@nowhere>2015-06-09 22:42:03 +0200
commit7de2411c4778d177fbab58afdd7a04e8012c7d2b (patch)
tree60d0cfa94891a3d5c0d1b96681ede3759f76d293
parent4a90b15f74281dce6d0502b4005cbff3c4e7cff3 (diff)
downloadmpv-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.
-rw-r--r--video/out/gl_utils.c2
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;