diff options
author | wm4 <wm4@nowhere> | 2016-04-14 22:39:10 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-04-14 22:48:12 +0200 |
commit | 4ebac1e936f761f08d455acf77be40c93048f6d5 (patch) | |
tree | a48bb3fb9aa1f61f4fc0a5e4930ad176122361aa /player/screenshot.c | |
parent | e13cc25a2ca815f6351def8ebb6e18a89b46b6b5 (diff) | |
download | mpv-4ebac1e936f761f08d455acf77be40c93048f6d5.tar.bz2 mpv-4ebac1e936f761f08d455acf77be40c93048f6d5.tar.xz |
player: fix use-after-free with --screenshot-directory
Probably fixes #3049.
Diffstat (limited to 'player/screenshot.c')
-rw-r--r-- | player/screenshot.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/player/screenshot.c b/player/screenshot.c index 02cbb4a500..33b972bb25 100644 --- a/player/screenshot.c +++ b/player/screenshot.c @@ -287,9 +287,10 @@ static char *gen_fname(screenshot_ctx *ctx, const char *file_ext) void *t = fname; dir = mp_get_user_path(t, ctx->mpctx->global, dir); fname = mp_path_join(NULL, dir, fname); - talloc_free(t); mp_mkdirp(dir); + + talloc_free(t); } if (!mp_path_exists(fname)) |