mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 11:19:55 +00:00
avformat/mpeg: Don't free unintialized pointer
In order to fix a potential memleak upon failure, 0b8956b2
made sure that
a buffer given by a pointer was freed upon error. But this pointer was
only initialized upon use and in several cases (Clang gives no fewer
than 13 -Wsometimes-uninitialized warnings) this meant that an
uninitialized pointer was used to free a buffer. So initialize the
pointer.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
531fbce0b2
commit
262eef6b89
@ -720,7 +720,7 @@ static int vobsub_read_header(AVFormatContext *s)
|
||||
int i, ret = 0, header_parsed = 0, langidx = 0;
|
||||
MpegDemuxContext *vobsub = s->priv_data;
|
||||
size_t fname_len;
|
||||
char *header_str;
|
||||
char *header_str = NULL;
|
||||
AVBPrint header;
|
||||
int64_t delay = 0;
|
||||
AVStream *st = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user