mirror of
https://github.com/mpv-player/mpv
synced 2024-12-22 23:02:37 +00:00
player: fix use-after-free with --screenshot-directory
Probably fixes #3049.
This commit is contained in:
parent
e13cc25a2c
commit
4ebac1e936
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user