From 7de2411c4778d177fbab58afdd7a04e8012c7d2b Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 9 Jun 2015 22:42:03 +0200 Subject: 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. --- video/out/gl_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3