mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-28 16:15:57 -05:00
[filescanner] Fix Use-after-free error
library/filescanner_ffmpeg.c:396:7: warning: Use of memory after it is freed
This commit is contained in:
parent
80a86cbab5
commit
21ce281cd1
@ -388,17 +388,18 @@ scan_metadata_ffmpeg(const char *file, struct media_file_info *mfi)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
free(path);
|
|
||||||
|
|
||||||
ret = avformat_find_stream_info(ctx, NULL);
|
ret = avformat_find_stream_info(ctx, NULL);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
DPRINTF(E_WARN, L_SCAN, "Cannot get stream info of '%s': %s\n", path, err2str(ret));
|
DPRINTF(E_WARN, L_SCAN, "Cannot get stream info of '%s': %s\n", path, err2str(ret));
|
||||||
|
|
||||||
avformat_close_input(&ctx);
|
avformat_close_input(&ctx);
|
||||||
|
free(path);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free(path);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/* Dump input format as determined by ffmpeg */
|
/* Dump input format as determined by ffmpeg */
|
||||||
av_dump_format(ctx, 0, file, 0);
|
av_dump_format(ctx, 0, file, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user